From a140e10bd7d48497c680f44bc815cb8874175805 Mon Sep 17 00:00:00 2001 From: miguel Date: Fri, 5 Aug 2022 11:35:19 +0100 Subject: [PATCH] Fix (to-git-or-not-to-git test, empty solutions) Fix (change the solution of mastertheLS to atime instead of ctime) Docs (change the request of the subject cl-camp1 to atime instead of ctime) Docs (ascii-art small typo in the banner and the fs readme) Docs (flags readme adding some information about the display message) Docs (printStr adding instruction and fixing the output) Docs (netfix project, adding explanation about the version of the project) --- sh/tests/solutions/mastertheLS | 2 +- sh/tests/to-git-or-not-to-git_test.sh | 4 +++ subjects/ascii-art/fs/README.md | 35 +++++++++++++++------------ subjects/ascii-art/thinkertoy.txt | 2 +- subjects/cl-camp1/README.md | 2 +- subjects/flags/README.md | 19 ++++++++------- subjects/netfix/README.md | 2 +- subjects/printstr/README.md | 4 +-- 8 files changed, 39 insertions(+), 31 deletions(-) diff --git a/sh/tests/solutions/mastertheLS b/sh/tests/solutions/mastertheLS index 6a71ddf6..3180c356 100755 --- a/sh/tests/solutions/mastertheLS +++ b/sh/tests/solutions/mastertheLS @@ -1,3 +1,3 @@ #!/usr/bin/env bash -ls -tF | tr '\r\n' ',' | sed 's/\(.*\),/\1/' +ls -p -tu | tr '\n' ',' | sed 's/.$//' diff --git a/sh/tests/to-git-or-not-to-git_test.sh b/sh/tests/to-git-or-not-to-git_test.sh index 438004f4..2c0af880 100755 --- a/sh/tests/to-git-or-not-to-git_test.sh +++ b/sh/tests/to-git-or-not-to-git_test.sh @@ -8,6 +8,10 @@ FILENAME="student/to-git-or-not-to-git.sh" if [ -f ${FILENAME} ]; then if [ -s ${FILENAME} ]; then + submitted=$(bash student/to-git-or-not-to-git.sh) + expected=$(bash solutions/to-git-or-not-to-git.sh) + echo $submitted + echo $expected diff <(echo "$submitted") <(echo "$expected") else echo "The file exist but empty" diff --git a/subjects/ascii-art/fs/README.md b/subjects/ascii-art/fs/README.md index c742d9a8..b8bc320f 100644 --- a/subjects/ascii-art/fs/README.md +++ b/subjects/ascii-art/fs/README.md @@ -31,23 +31,26 @@ $ go run . "hello" standard | cat -e $ $ $ go run . "Hello There!" shadow | cat -e - $ -_| _| _| _| _|_|_|_|_| _| $ -_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| $ -_|_|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _|_| _|_|_|_| $ -_| _| _| _| _| _| _| _| _| _| _| _| _| $ -_| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _|_|_| $ - $ - $ + $ +_| _| _| _| _|_|_|_|_| _| _| $ +_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| _| $ +_|_|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _|_| _|_|_|_| _| $ +_| _| _| _| _| _| _| _| _| _| _| _| _| $ +_| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _|_|_| _| $ + $ + $ + + + $ go run . "Hello There!" thinkertoy | cat -e - $ -o o o o o-O-o o $ -| | | | | | $ -O--O o-o | | o-o | O--o o-o o-o o-o $ -| | |-' | | | | | | | |-' | |-' $ -o o o-o o o o-o o o o o-o o o-o $ - $ - $ + $ +o o o o o-O-o o o $ +| | | | | | | $ +O--O o-o | | o-o | O--o o-o o-o o-o o $ +| | |-' | | | | | | | |-' | |-' $ +o o o-o o o o-o o o o o-o o o-o O $ + $ + $ ``` ### Allowed packages diff --git a/subjects/ascii-art/thinkertoy.txt b/subjects/ascii-art/thinkertoy.txt index ed727f87..725d71ea 100644 --- a/subjects/ascii-art/thinkertoy.txt +++ b/subjects/ascii-art/thinkertoy.txt @@ -9,13 +9,13 @@ - o | o O + o o | | diff --git a/subjects/cl-camp1/README.md b/subjects/cl-camp1/README.md index bf8be930..39f466c7 100644 --- a/subjects/cl-camp1/README.md +++ b/subjects/cl-camp1/README.md @@ -13,7 +13,7 @@ Put in a file `mastertheLS` the command line that will: - list the files and directories of the current directory. - Ignore the hidden files, the "." and the "..". - Separates the results with commas. -- Order them by ascending order of creation date (the newest first). +- Order them by ascending order of access time (the last file to be accessed first). - Have the directories ends with a `/`. ### Hint diff --git a/subjects/flags/README.md b/subjects/flags/README.md index 83b1ba7b..152a9e85 100644 --- a/subjects/flags/README.md +++ b/subjects/flags/README.md @@ -9,6 +9,10 @@ This program should : - Insert the string given to the `--insert` (or `-i`), into the argument `string`, if given. - If the flag `--order` (or `-o`) is given, order the `string` argument (in ASCII order). - If there are no arguments or if the flag `--help` (or `-h`) is given, the options should be printed as in the example. + - The short flag will have two spaces before the (-). + - The explanation of the flag will have a tab followed by a space before the beginning of the sentence (This flag...). + +***Note:*** Don't mind the extra spaces or tabs on the following example as they were placed there to provide a better understanding and visualization of the output in the terminal. Follow the rules above for the spacing. Example of output : @@ -24,25 +28,22 @@ $ go run . --order 43a21 $ go run . --insert -i - This flag inserts the string into the string passed as argument. + This flag inserts the string into the string passed as argument. --order -o - This flag will behave like a boolean, if it is called it will order the argument. -$ + This flag will behave like a boolean, if it is called it will order the argument. $ go run . -h --insert -i - This flag inserts the string into the string passed as argument. + This flag inserts the string into the string passed as argument. --order -o - This flag will behave like a boolean, if it is called it will order the argument. -$ + This flag will behave like a boolean, if it is called it will order the argument. $ go run . --help --insert -i - This flag inserts the string into the string passed as argument. + This flag inserts the string into the string passed as argument. --order -o - This flag will behave like a boolean, if it is called it will order the argument. -$ + This flag will behave like a boolean, if it is called it will order the argument. ``` diff --git a/subjects/netfix/README.md b/subjects/netfix/README.md index b3c35a14..8e5272fd 100644 --- a/subjects/netfix/README.md +++ b/subjects/netfix/README.md @@ -6,7 +6,7 @@ Imagine there was a place in which you could ask someone to fix your bidet and a This website is still in the creation process, so not all features are available. You are going to implement some of the missing features. -You should also know that the website is being created in Django, a Python framework for web development. You can learn more about this framework in its own [website](https://www.djangoproject.com/). Yes, you will be messing around with Python, so be aware of the indentation. +You should also know that the website is being created in Django, a Python framework for web development. You can learn more about this framework in its own [website](https://www.djangoproject.com/). Yes, you will be messing around with Python, so be aware of the indentation. Also, you will need to know that this project was build in the version `v3.1.14` of Django, so if you have problems to run this project, please check your current version of Django and make the necessary changes in order to get the project to run. ### Instructions diff --git a/subjects/printstr/README.md b/subjects/printstr/README.md index 21dd8d2e..10d91409 100644 --- a/subjects/printstr/README.md +++ b/subjects/printstr/README.md @@ -2,7 +2,7 @@ ### Instructions -- Write a function that prints one by one the characters of a `string` on the screen. +- Write a function that prints one by one the characters of a `string` on the screen. The output must be followed by a new line at the end. ### Expected function @@ -30,7 +30,7 @@ And its output : ```console $ go run . | cat -e -Hello World! +Hello World!$ $ ```