You are getting trashed because of shell expansions of the *.tmp prior toQuote:>if i put 'find' command in a piece of script, how could i make it take
>command arguments? ie. i want to delete files with .tmp extension, following
>will just do it:
>find . -name \*.tmp -ok rm {} \;
>then i want to put above in a file, say 'fdel', and i'd like it works in a
>way like:
>'fdel *.tmp', or 'fdel *.dat', etc.
>how? i've tried something without success. any pointers are appreciated.
getting into the script. Try something like:
find . -name \*.$1 -ok rm {}\;
The $1 will be replaced by the first argument of the "fdel" command as in
fdel dat
will be run as
find . -name \*.dat -ok rm {} \;
Good luck