I have created a script to move some stuff without needing to write lots of parameters.
Bash
#!/bin/bash
echo "Copying $1 to /storage/Repositorio/TVSHOW/"
cp -R -v /storage/Torrent/Download/Seeding/$1 /storage/Repositorio/TVSHOW/
echo "Command finished."
The thing is, I'd like to make it loop while it have parameters. Something like:
Code
while (have paramaters) {
echo "Copying $# to /storage/Repositorio/TVSHOW/"
cp -R -v /storage/Torrent/Download/Seeding/$# /storage/Repositorio/TVSHOW/
$count++
}
echo "$count dir/files were processed"
echo "Check the verbose output"
}
Can anyone here help me with that? I actually only need to know the "(have parameters)" part.