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

Re: Bash argument expanded inside alias



> From: Camaleón <noelamac@gmail.com>
> Date: Tue, 13 Mar 2012 18:06:11 +0000 (UTC)
>
> > does not work to do what your intuition imagine what I want it to do?
> It's not the alias but the command itself.
> ***
> alias muda='find . -name "*" -mtime $1'
> ***
> And pass the negative value "-n" as argument (e.g., "muda -2")
> Greetings,
> --
> Camaleón


Dear Camaleón,

That is definitely the most elegant solution. Thanks!

I was wondering, why the "-" cannot be there? Can we "escape" it?

I mean, what if it was a file name, we can always concatenate, lets
say "file-$1-$2.pdf", can't we?

Cheers,
Beco.


Reply to: