Restore
Matthew Flaschen
matthew.flaschen at gatech.edu
Mon Apr 23 20:18:29 UTC 2007
Art Alexion wrote:
> alias rm = "mv $1 $2 $3 $4 $5 ~/.Trash/"
Again, aliases don't take parameters.
> You don't need multiple variables to delete multiple files using wild cards, i.e 'rm *.dll' is only
> one variable
That's incorrect. The shell expands *.dll into a list of all the dll
files before passing it to the function.
If you have:
for i in $(seq 1 10); do touch $i.dll; done; function echo_many (){echo
$1 $2 $3}; echo_many *.dll
The shell will output:
10.dll 1.dll 2.dll
The correct script is:
movetotrash () { mv -i $* $HOME/.local/share/Trash/files }
Matthew Flaschen
More information about the kubuntu-users
mailing list