main #1

Merged
liana merged 11 commits from main into first-script 2025-12-16 18:31:39 +00:00
Showing only changes of commit 648fd1478c - Show all commits

19
forFile.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
# Verificăm dacă există cel puțin un argument
if [ $# -lt 1 ]; then
echo "Usage: ./script.sh <name1> [name2 ... nameN]"
exit 1
fi
# Loop prin toate argumentele folosind $@
for name in "$@"; do
if [ "$name" == "Liana" ]; then
echo "Hello, $name! You are awesome!"
else
echo "Hello, $name!"
fi
done
exit 0