Re: Adding an alias to .cshrc

2009-12-30 Thread Jerry McAllister
On Tue, Dec 29, 2009 at 08:07:35PM -0500, Steve Bertrand wrote: > Glen Barber wrote: > > Hi Steve > > > > On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand wrote: > >> Hi all, happy holidays! > >> > >> I want to add an alias to my .cshrc file: > >> > >> alias srm find . -name "*~" | xargs rm > >

Re: Adding an alias to .cshrc

2009-12-30 Thread Jerry McAllister
On Tue, Dec 29, 2009 at 07:50:21PM -0500, Steve Bertrand wrote: > Hi all, happy holidays! > > I want to add an alias to my .cshrc file: > > alias srm find . -name "*~" | xargs rm > Your problem is quoting the command. It has multiple parts with white space, so it all needs to be quoted. So

Re: Adding an alias to .cshrc

2009-12-29 Thread George Davidovich
On Tue, Dec 29, 2009 at 07:50:21PM -0500, Steve Bertrand wrote: > I want to add an alias to my .cshrc file: > > alias srm find . -name "*~" | xargs rm No need for xargs: alias srm "find . -name '*~' -exec rm {} +" or alias srm "find . -name '*~' -delete" > ...so that I have an easy way

Re: Adding an alias to .cshrc

2009-12-29 Thread Steve Bertrand
Glen Barber wrote: > Hi Steve > > On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand 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 \"*~\" |

Re: Adding an alias to .cshrc

2009-12-29 Thread Glen Barber
Hi Steve On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand 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" Regards, -- Glen Barber _

Re: Adding an alias to .cshrc

2009-12-29 Thread Olivier Nicole
Hi, > Is this a problem with the pipe in the alias directive? The command > works on the CLI, as I literally copy/pasted it into the .cshrc file. I would think so. What about: alias srm /usr/bin/find . -name "*~" -delete Best regards, Olivier ___