mirror of https://github.com/01-edu/public.git
nprimo
2 years ago
committed by
eslopfer
30 changed files with 89 additions and 0 deletions
@ -0,0 +1 @@
|
||||
ciao mamma guarda come mi diverto |
@ -0,0 +1 @@
|
||||
ciao mamma guarda qu |
@ -0,0 +1 @@
|
||||
123 |
@ -0,0 +1 @@
|
||||
1 |
@ -0,0 +1 @@
|
||||
12 |
@ -0,0 +1 @@
|
||||
12 |
@ -0,0 +1 @@
|
||||
12345678 |
@ -0,0 +1 @@
|
||||
12 |
@ -0,0 +1 @@
|
||||
123456 |
@ -0,0 +1 @@
|
||||
12 |
@ -0,0 +1 @@
|
||||
123 |
@ -0,0 +1 @@
|
||||
123456 |
@ -0,0 +1 @@
|
||||
1234512312312312 |
@ -0,0 +1 @@
|
||||
123456 |
@ -0,0 +1 @@
|
||||
123 |
@ -0,0 +1 @@
|
||||
12312312312 12 312 312 12 3 |
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash |
||||
|
||||
set -euo pipefail |
||||
IFS=' |
||||
' |
||||
|
||||
FILENAME="student/largest.sh" |
||||
script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd) |
||||
|
||||
challenge () { |
||||
submitted=$(cd "$1" && bash "$script_dirS"/"$FILENAME") |
||||
expected=$(cd "$1" && bash "$script_dirS"/solutions/largest.sh) |
||||
|
||||
diff <(echo "$submitted") <(echo "$expected") |
||||
} |
||||
|
||||
if [ $(cat "$script_dirS"/"$FILENAME" | grep echo) ]; then |
||||
echo "echo is not allowed in this exercise!" |
||||
exit 1 |
||||
fi |
||||
|
||||
challenge largest-dir/folder1 |
||||
challenge largest-dir/folder2 |
||||
challenge largest-dir |
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash |
||||
|
||||
find . -type f -exec ls -lha {} \; | sort -hrk5 | head -7 | awk '{printf("%5s | ", $5); print $NF}' |
Loading…
Reference in new issue