|
|
|
@ -19,9 +19,28 @@ Here are some Commands that can help you:
|
|
|
|
|
- Replace all occurrences of a character in a file, and print the result: |
|
|
|
|
`tr {{find_character}} {{replace_character}} < {{filename}}` |
|
|
|
|
|
|
|
|
|
```console |
|
|
|
|
$ cat uid.txt |
|
|
|
|
My |
|
|
|
|
UID |
|
|
|
|
is |
|
|
|
|
1000 |
|
|
|
|
$ tr "\n" " " < uid.txt |
|
|
|
|
My UID is 1000 |
|
|
|
|
$ |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
- `ls`. List directory contents. |
|
|
|
|
- `sed`. Edit text in a scriptable manner. |
|
|
|
|
|
|
|
|
|
```console |
|
|
|
|
$ cat text.txt |
|
|
|
|
unix is a great os. unix is opensource. unix is a free os. |
|
|
|
|
$ sed 's/unix/linux/' text.txt |
|
|
|
|
linux is a great os. unix is opensource. unix is a free os. |
|
|
|
|
$ |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
> You have to use Man or Google to know more about commands flags, in order to solve this exercise! |
|
|
|
|
> Google and Man will be your friends! |
|
|
|
|
|
|
|
|
|