From owner-freebsd-questions@FreeBSD.ORG Wed Dec 30 01:07:27 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 F09381065679 for ; Wed, 30 Dec 2009 01:07:27 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: from smtp.ibctech.ca (v6.ibctech.ca [IPv6:2607:f118::b6]) by mx1.freebsd.org (Postfix) with SMTP id 7790C8FC17 for ; Wed, 30 Dec 2009 01:07:27 +0000 (UTC) Received: (qmail 76617 invoked by uid 89); 30 Dec 2009 01:06:34 -0000 Received: from unknown (HELO ?IPv6:2607:f118::5?) (steve@ibctech.ca@2607:f118::5) by 2607:f118::b6 with ESMTPA; 30 Dec 2009 01:06:34 -0000 Message-ID: <4B3AA7D7.6090505@ibctech.ca> Date: Tue, 29 Dec 2009 20:07:35 -0500 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Glen Barber References: <4B3AA3CD.3020709@ibctech.ca> <4ad871310912291656n24acc27dn5f80ce78fb22825c@mail.gmail.com> In-Reply-To: <4ad871310912291656n24acc27dn5f80ce78fb22825c@mail.gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "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 01:07:28 -0000 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' 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