[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash argument expanded inside alias



> Dear Debian users,
> 
> Anyone knows why this command:
> 
> :~$ alias muda='find . -name "*" -mtime -$1'
> 
> and all this variations I tried:
[...]
> does not work to do what your intuition imagine what I want it to do?

Hi Beco,

It doesn't work because aliases don't take arguments.
You can use a shell function instead. For example,

muda()
{
   find . -name "*" -mtime -$1
}


-- 
Cheers,
Clive


Reply to: