From 4da285b07f80b06df27e6c69a49c4cae51c6f820 Mon Sep 17 00:00:00 2001 From: miguel Date: Fri, 9 Dec 2022 17:08:20 +0000 Subject: [PATCH] docs(skip-lines): moving the subject to the folder devops and fix readme --- subjects/{ => devops}/skip-lines/README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) rename subjects/{ => devops}/skip-lines/README.md (75%) 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 13e21e86b..2dc199fb1 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).