Re: Adding an alias to .cshrc



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 <steve@xxxxxxxxxx> 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'

That is OK as long as you are not depending on shell expansion effects.

////jerry



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
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Adding an alias to .cshrc
    ... I want to add an alias to my .cshrc file: ... Try enclosing it in quotes, ... Instead of escaping, ...
    (freebsd-questions)
  • Re: Help with Comma Delimited Files
    ... > The original file had each field enclosed in quotes ... > enclosed in quotes. ... The CSV file had Albany,NY but the software will not ... > this by parsing out the fields and enclosing them in quotes? ...
    (microsoft.public.excel)
  • Re: Help with Comma Delimited Files
    ... >> The original file had each field enclosed in quotes ... >> enclosed in quotes. ... The CSV file had Albany,NY but the software will not ... >> this by parsing out the fields and enclosing them in quotes? ...
    (microsoft.public.excel)
  • Re: single quotes in recipient address causes dns lookup failure
    ... quotes which causes DNS lookups to fail. ... believe using single-quotes like this around the RHS value of the ... recipient address is illegal ... ... end to avoid delivery failures in such cases? ...
    (comp.mail.sendmail)
  • Re: single quotes in recipient address causes dns lookup failure
    ... quotes which causes DNS lookups to fail. ... believe using single-quotes like this around the RHS value of the ... name starts with an apostrophe). ... emails so that they use 'correct' syntax for email addresses. ...
    (comp.mail.sendmail)