Adding an alias to .cshrc

Steve Bertrand steve at ibctech.ca
Wed Dec 30 01:07:28 UTC 2009


Glen Barber wrote:
> Hi Steve
> 
> On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand <steve at 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


More information about the freebsd-questions mailing list