From owner-freebsd-questions@FreeBSD.ORG Thu Jun 26 14:32:00 2008 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 C1C44106568C for ; Thu, 26 Jun 2008 14:32:00 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 79BFE8FC28 for ; Thu, 26 Jun 2008 14:32:00 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.183.219] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1KBsVt-0000mA-TD; Thu, 26 Jun 2008 16:31:53 +0200 Message-ID: <4863A85A.3010409@FreeBSD.org> Date: Thu, 26 Jun 2008 16:31:54 +0200 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.14 (X11/20080610) MIME-Version: 1.0 To: juri_mian@yahoo.com References: <510944.89845.qm@web45604.mail.sp1.yahoo.com> In-Reply-To: <510944.89845.qm@web45604.mail.sp1.yahoo.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-questions@freebsd.org Subject: Re: why can't I use $1 in .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: Thu, 26 Jun 2008 14:32:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Juri Mianovich wrote: | I am trying to use this alias in my root .cshrc file: | | grep $1 /some/file | | but .cshrc _refuses_ to expand $1 as a proper variable (in this case, the first argument to the alias...) | | I _think_ it's because $1 is being interpreted as a argument to csh _itself_ when it runs .cshrc ... but maybe I'm wrong. | | Anyway, how to make it work ? Try with \!\!:1 Example: alias say echo 'I say \!\!:1' | say hello I say hello | | Thanks. You're welcome. - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAkhjqFkACgkQwMJqmJVx944z4QCeKf5wirL9TOqAy0QhyUt7f0mE /2AAoJB1nkUYSfd4/QEdmJUEENaUsA12 =zK3x -----END PGP SIGNATURE-----