Got a exercise from a course manual I'm trying to do.
The first part is to use a until loop to iterate through the positional parameters on the command line using the shift command. I've for this working fine.
echo "Start Backup"
until test "$1" = ""
echo -e "\nBackup ""$1"" to /backup"
rsync -av --no-whole-file "$1" /backup
The next part of the exercise is to do the above but use a for loop instead of the until loop.
I'm thinking of doing a endless for loop and then when a condition is true break out of the loop? Is there a easier way to do this?