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

Re: Bash argument expanded inside alias



Dear Clive, dear Tom,

Thanks for your time!

The solution:

mudafct() { find . -name "*" -mtime -$1; }
alias muda='mudafct'

seems to works inside .bashrc file! (Just 'seems' because I did not
reboot, just typed in a terminal and it worked great!)

Thanks both,

Beco.



To: debian-user@lists.debian.org
Subject: Re: Bash argument expanded inside alias
From: Clive Standbridge <list-user@tgstandbridges.plus.com>
Date: Tue, 13 Mar 2012 15:49:52 +0000


> 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: