mirror of https://github.com/01-edu/public.git
issues on public
This commit is contained in:
parent
82b32e0998
commit
3969d79c84
|
@ -4,8 +4,16 @@
|
|||
set -euo pipefail
|
||||
IFS='
|
||||
'
|
||||
FILENAME="student/to-git-or-not-to-git.sh"
|
||||
|
||||
submitted=$(bash student/to-git-or-not-to-git.sh)
|
||||
expected=$(bash solutions/to-git-or-not-to-git.sh)
|
||||
|
||||
diff <(echo "$submitted") <(echo "$expected")
|
||||
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)
|
||||
diff <(echo "$submitted") <(echo "$expected")
|
||||
else
|
||||
echo "File exist but empty"
|
||||
fi
|
||||
else
|
||||
echo "File does not exist"
|
||||
fi
|
||||
|
|
|
@ -14,7 +14,8 @@ $ cat <<EOF> quest8T.txt
|
|||
"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
|
||||
EOF
|
||||
$ go run . abc
|
||||
ERROR: abc: No such file or directory
|
||||
ERROR: open abc: no such file or directory
|
||||
exit status 1
|
||||
$ go run . quest8.txt
|
||||
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
|
||||
$ go run . quest8.txt abc
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
"Now, do your inventory"
|
||||
|
||||
Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders contained in the current directory and its sub-folders :
|
||||
Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders contained in the current directory and its sub-folders (the current directory must be included in the count):
|
||||
|
||||
### Usage
|
||||
|
||||
|
|
Loading…
Reference in New Issue