As the title suggests I'm just starting out with shellscript so don't really know much about it!
My question is this - why does the following wildcard work in bash
mv *.txt /root/Dustbin
#sh scriptname del
mv -u $1 /root/Dustbin
#END OF SCRIPT
$1 is the first argument of the script. So even if there are multiple files matching
*.txt, only the first one will be moved.
If you want to move all of them, use
#!/bin/sh mv -u "$@" /root/Dustbin