From ac848c2249e40b134106c225b5a74154947ab96b Mon Sep 17 00:00:00 2001 From: miguel Date: Thu, 19 Jan 2023 18:17:17 +0000 Subject: [PATCH] docs(devops): add info to readmes in the scripting piscine --- .../devops/find-files-extension/README.md | 20 ++++++++++++------- subjects/devops/master-the-ls/README.md | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/subjects/devops/find-files-extension/README.md b/subjects/devops/find-files-extension/README.md index 17a03aaf5..7282578fa 100644 --- a/subjects/devops/find-files-extension/README.md +++ b/subjects/devops/find-files-extension/README.md @@ -29,24 +29,26 @@ $ ### Hints -`find` command is used to search and locate the list of files and directories based on conditions you specify for files that match the arguments: -You can use REGEX in `find` command. +The `find` command is used to search and locate the list of files and directories based on conditions you specify for files that match the arguments: + +You can use REGEX in the `find` command. ```console -$find ~/ -iregex '' +$ find ~/ -iregex '' $ ``` + REGEX for txt files: `.*\.\(txt\)` -`cut` command is a command-line utility that allows you to cut out sections of a specified file or piped data and print the result: +The `cut` command is a command-line utility that allows you to cut out sections of a specified file or piped data and print the result: ```console -$cat cut-example.txt +$ cat cut-example.txt abc-lol testtest-abcx qwerty-azerty-x -$cat cut-example.txt | cut -d "-" -f 1 # cut the lines with "-" as delimiter and print the first part. +$ cat cut-example.txt | cut -d "-" -f 1 # cut the lines with "-" as delimiter and print the first part. abc testtest qwerty @@ -56,4 +58,8 @@ $ You may need to use pipes `(|)` and the logical operator `&&`. > You have to use Man or Google to know more about commands flags, in order to solve this exercice! -> Google and Man will be your friends! \ No newline at end of file +> Google and Man will be your friends! + +### References + +[Regex](https://www.computerhope.com/jargon/r/regex.htm) diff --git a/subjects/devops/master-the-ls/README.md b/subjects/devops/master-the-ls/README.md index c99ad1729..dd4f86168 100644 --- a/subjects/devops/master-the-ls/README.md +++ b/subjects/devops/master-the-ls/README.md @@ -5,7 +5,7 @@ Create a script `master-the-ls.sh`, that will do the following: - list the files and directories of the current directory. -- Ignore the hidden files, the "." and the "..". +- Ignore the hidden files, the current directory `.` and the parent directory `..`. - Separates the results with commas. - Order them by ascending order of access time (the newest first). - Have the directories ends with a `/`.