IF statements added
This commit is contained in:
2
playground/README.md
Normal file
2
playground/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
### fun.sh ---------verifica fisierele dintr-un director si scrie un comentariu pentru fiecare------ ###
|
||||
#### ... for, if, elif, echo ####
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user