Browse Source

docs(strange-files): moving the subject to the folder devops

fix readme and add more files
pull/1658/head
miguel 1 year ago committed by MSilva95
parent
commit
3410c9ee5a
  1. 0
      sh/tests/solutions/"\?$*'Hard_file'*$?\"
  2. 1
      sh/tests/solutions/"medium_File!"
  3. 1
      sh/tests/solutions/firstFile
  4. 4
      sh/tests/strange-files_test.sh
  5. 29
      subjects/devops/strange-files/README.md

0
sh/tests/solutions/"\?$*'First_file'*$?\" → sh/tests/solutions/"\?$*'Hard_file'*$?\"

1
sh/tests/solutions/"medium_File!"

@ -0,0 +1 @@
Random text inside!

1
sh/tests/solutions/firstFile

@ -0,0 +1 @@
Random text inside!

4
sh/tests/strange-files_test.sh

@ -5,4 +5,6 @@ set -euo pipefail
IFS='
'
diff student/\"\\?\$*\'First_file\'*\$?\\\" solutions/\"\\?\$*\'First_file\'*\$?\\\"
diff student/firstFile solutions/firstFile
diff student/\"medium_File\!\" solutions/\"medium_File\!\"
diff student/\"\\?\$*\'Hard_file\'*\$?\\\" solutions/\"\\?\$*\'Hard_file\'*\$?\\\"

29
subjects/strange-files/README.md → subjects/devops/strange-files/README.md

@ -27,17 +27,36 @@ Example:
If you want to create a file named `foo!\.txt` You have to escape the characters like so:
```console
User-> code foo\!\\.txt
$ touch foo\!\\.txt
```
### Instructions
Create a file `"\?$*'First_file'*$?\"` that will contain `Random text inside!` and **nothing else**.
Create a file the following files:
- `firstFile` which contains `Random text inside!` and **nothing else**
- `"medium_File!"` which contains `Random text inside!` and **nothing else**
- `"\?$*'Hard_file'*$?\"` which contains `Random text inside!` and **nothing else**.
### Usage
```console
User-> ls | cat -e
"\?$*'First_file'*$?\"$
User->
$ ls | cat -e
"?$*'First_file'*$?\"$
firstFile$
"medium_file!"$
$
```
### Hints
- `ls`. List directory contents.
- `touch` used to create, change and modify timestamps of a file.
> 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
- [ls](https://www.gnu.org/software/coreutils/ls).
- [touch](https://www.gnu.org/software/coreutils/touch).
Loading…
Cancel
Save