Date: Thu, 26 Jun 2008 16:31:54 +0200 From: Pietro Cerutti <gahr@FreeBSD.org> To: juri_mian@yahoo.com Cc: freebsd-questions@freebsd.org Subject: Re: why can't I use $1 in .cshrc ? Message-ID: <4863A85A.3010409@FreeBSD.org> In-Reply-To: <510944.89845.qm@web45604.mail.sp1.yahoo.com> References: <510944.89845.qm@web45604.mail.sp1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4863A85A.3010409>