From owner-freebsd-questions@FreeBSD.ORG Wed Dec 30 15:39:46 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A03C10656A9 for ; Wed, 30 Dec 2009 15:39:46 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 29D388FC1E for ; Wed, 30 Dec 2009 15:39:46 +0000 (UTC) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id nBUFZ3Zm018432; Wed, 30 Dec 2009 10:35:03 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id nBUFZ3L0018431; Wed, 30 Dec 2009 10:35:03 -0500 (EST) (envelope-from jerrymc) Date: Wed, 30 Dec 2009 10:35:03 -0500 From: Jerry McAllister To: Steve Bertrand Message-ID: <20091230153503.GB18368@gizmo.acns.msu.edu> References: <4B3AA3CD.3020709@ibctech.ca> <4ad871310912291656n24acc27dn5f80ce78fb22825c@mail.gmail.com> <4B3AA7D7.6090505@ibctech.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B3AA7D7.6090505@ibctech.ca> User-Agent: Mutt/1.4.2.2i Cc: Glen Barber , "freebsd-questions@freebsd.org Questions -" Subject: Re: Adding an alias to .cshrc X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2009 15:39:46 -0000 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 > >> > > > > 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"