I can’t retrieve the way to define a shell alias (in bash) like this one :
alias suppr='/usr/bin/find . -name "*~" | xargs rm -f'
but with “*~” as a parameter of the alias.
I would like to use it like : suppr “.bak” or suppr “*.svn” etc…
(it’s just a dummy example here)
Use a function:
suppr() { /usr/bin/find . -name "$@" | xargs rm -f }In general, functions are more flexible and safer to use than aliases. In fact, many people argue that functions should always be used instead of aliases.