Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2009 20:07:35 -0500
From:      Steve Bertrand <steve@ibctech.ca>
To:        Glen Barber <glen.j.barber@gmail.com>
Cc:        "freebsd-questions@freebsd.org Questions -" <freebsd-questions@freebsd.org>
Subject:   Re: Adding an alias to .cshrc
Message-ID:  <4B3AA7D7.6090505@ibctech.ca>
In-Reply-To: <4ad871310912291656n24acc27dn5f80ce78fb22825c@mail.gmail.com>
References:  <4B3AA3CD.3020709@ibctech.ca> <4ad871310912291656n24acc27dn5f80ce78fb22825c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Glen Barber wrote:
> Hi Steve
> 
> On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand <steve@ibctech.ca> wrote:
>> Hi all, happy holidays!
>>
>> I want to add an alias to my .cshrc file:
>>
>> alias srm   find . -name "*~" | xargs rm
>>
> 
> Try enclosing it in quotes, such as:
> 
>    alias srm "find . -name \"*~\" | xargs rm"

This works. Instead of escaping, I just encapsulated within single-quotes:

acct-dev: ISP-RADIUS % grep srm /home/steve/.cshrc
alias srm       '/usr/bin/find . -name "*~" | /usr/bin/xargs rm'

Olivier:

I didn't test your theory, but thanks for the tip. I've just become
accustomed over the years to use xargs when making bulk rm's ;)

Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B3AA7D7.6090505>