rcb wrote:
> 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.
It's
> From Chris Davies, Wed, 14 Mar 2012 20:36:43 +
> 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 sup
rcb wrote:
> And I can run my alias without using a function, just typing:
> $ muda -10
> Unfortunately, you cannot, for example, change the directory with an
> argument, because 'find' can't accept a command in an inverted order
> like:
> $find -mtime -10 /home/kilemal
And the function is trivi
On Mi, 14 mar 12, 09:50:11, rcb wrote:
> PPS. I think I need to change the list subscription from digest to
> normal emails. I tried subject:help to debian-user-request, but the
> message that came back was of no help. (Maybe this is offtopic here --
> in this email of course, and in the list in ge
On Tue 13 Mar 2012 15:49:52 +(+), Clive Standbridge wrote:
> Oh I think I misunderstood the question.
> On second thoughts, I think you probably meant to use an alias inside
> a shell script, and to use the script's argument in the alias. In that
> case, the problem would be shell paramete
On Tue, 13 Mar 2012 23:17:41 -0300, rcb wrote:
>> From: Camaleón
>> Date: Tue, 13 Mar 2012 18:06:11 + (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 pas
On 14/03/12 12:50, rcb wrote:
Dear Camaleón,
Unfortunately, this nice command of yours doesn't seem to work. Is it
me typing something wrong, or there is really a problem?
:~$ alias muda='find $1 -name "*" -mtime $2'
:~$ muda /home/cheetara -4
find: invalid arg `-4' for `-mtime'
Command line p
rcb wrote:
> mudafct() { find . -name "*" -mtime -$1; }
Is there any reason why you're using a { -name "*" } part? A quick test
suggests that you might as well discard it:
mudafct() { find . -mtime -"$1"; }
Chris
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subj
> From: Chris Bannister , Date: Wed, 14 Mar 2012
> 18:00:24 +1300
>
> [Please, don't top post in this mailing list]
>
> Just logout then log back in again, or even better, type:
> "source .bashrc" at a command prompt. :)
> --
> "Religion is excellent stuff for keeping common people quiet."
> --
[Please, don't top post in this mailing list]
On Tue, Mar 13, 2012 at 02:47:27PM -0300, rcb wrote:
> seems to works inside .bashrc file! (Just 'seems' because I did not
> reboot, just typed in a terminal and it worked great!)
You shouldn't reboot for changes you make to your .bashrc
to take effe
> From: Camaleón
> Date: Tue, 13 Mar 2012 18:06:11 + (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
On Tue, 13 Mar 2012 11:34:12 -0300, rcb wrote:
(no html, please)
> Dear Debian users,
>
> Anyone knows why this command:
>
> :~$ alias muda='find . -name "*" -mtime -$1'
(...)
> does not work to do what your intuition imagine what I want it to do?
It's not the alias but the command itself.
oth,
Beco.
To: debian-user@lists.debian.org
Subject: Re: Bash argument expanded inside alias
From: Clive Standbridge
Date: Tue, 13 Mar 2012 15:49:52 +
> 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
On Tue 13 Mar 2012 15:49:52 +(+), Clive Standbridge wrote:
> > 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 i
On Tue, Mar 13, 2012 at 11:49 AM, Clive Standbridge
wrote:
>>
>> 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 wor
On Tue, Mar 13, 2012 at 10:34 AM, rcb wrote:
>
> Anyone knows why this command:
>
> :~$ alias muda='find . -name "*" -mtime -$1'
>
> and all this variations I tried:
>
> :~$ alias muda='find . -name "*" -mmin -`echo $1`'
> :~$ alias muda='find . -name "*" -mmin `echo -$1`'
> :~$ alias muda='find .
> 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
17 matches
Mail list logo