diff --git a/playground/README.md b/playground/README.md new file mode 100644 index 0000000..e625de6 --- /dev/null +++ b/playground/README.md @@ -0,0 +1,2 @@ +### fun.sh ---------verifica fisierele dintr-un director si scrie un comentariu pentru fiecare------ ### +#### ... for, if, elif, echo #### diff --git a/playground/fun.sh b/playground/fun.sh index e52a8ca..8567ee7 100644 --- a/playground/fun.sh +++ b/playground/fun.sh @@ -2,6 +2,15 @@ echo "Robotul analizaeaza fisierele..." for i in * do - echo "File: $f" -done + echo "File: $i" + if [[ "$i" == *.sh ]]; then + echo "Script magic detectat!"; + elif [ ! -s "$i" ]; then + echo "Nu te pot ajuta cu nimic, sunt gol!" + else + echo "Contin secrete!"; + fi + + echo "-----------------" +done