Re: Re: Bash argument expanded inside alias
> From Chris Davies, Wed, 14 Mar 2012 20:36:43 +0000
> And the function is trivial. Just pop it in your .bashrc
> muda() { local M="$1" D="$2"; find "${D:-.}" -mtime -"${M:-1}"; }
> Why are you so reluctant to use functions? Even the bash man page says,
> "For almost every purpose, aliases are superseded by shell functions."
> Puzzled.
> Chris
Hi Chris,
I think I just learned a lot about functions with this thread, things
I didn't know.
At first I thought the best choice to abbreviate a command would be an
alias, and functions was to encapsulate big chunks of script code.
Never occurred to me I could use it as an alias.
Thanks,
Beco
Reply to: