diff --git a/subjects/skip-lines/README.md b/subjects/devops/skip-lines/README.md similarity index 75% rename from subjects/skip-lines/README.md rename to subjects/devops/skip-lines/README.md index 13e21e86..2dc199fb 100644 --- a/subjects/skip-lines/README.md +++ b/subjects/devops/skip-lines/README.md @@ -7,7 +7,7 @@ Write a command line in a `skip-lines.sh` file that prints the result of a `ls - Example: ```console -User-> ls -l +$ ls -l drwxr-xr-x 16 User User 4096 nov 11 10:55 Desktop drwxr-xr-x 22 User User 4096 nov 4 10:02 Documents drwxr-xr-x 6 User User 4096 nov 11 10:40 Downloads @@ -24,24 +24,29 @@ drwxr-xr-x 6 User User 4096 nov 11 10:40 Downloads drwxr-xr-x 2 User User 4096 set 29 10:34 Pictures ``` -**Tips:** +### Hints Here are some Commands that can help you: -- `sed`. Edit text in a scriptable manner. You can see also: awk. [For more information](https://www.gnu.org/software/sed/manual/sed.html). +- `sed`. Edit text in a scriptable manner. - Print just a first line to stdout: `{{command}} | sed -n '1p'` ```console -User-> cat file +$ cat file AIX Solaris Unix Linux HPUX -User-> sed -n '1p' file +$ sed -n '1p' file AIX ``` -Use man to see how `awk` or `sed` works, they can do the job. +> 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! + +### References + +- [Sed](https://www.gnu.org/software/sed/manual/sed.html).