Date: Wed, 18 Oct 2000 13:50:58 -0700 (PDT) From: Ken Bolingbroke <hacker@bolingbroke.com> To: Rick Hamell <hamellr@heorot.1nova.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: CSH Shell Message-ID: <Pine.BSF.4.21.0010181345010.73250-100000@fremont.bolingbroke.com> In-Reply-To: <Pine.BSF.4.21.0010171257460.12552-100000@heorot.1nova.com>
next in thread | previous in thread | raw e-mail | index | archive | help
You want to use backticks instead of single quotes, that is, where you currently have: set prompt="'hostname' %" Change the single quotes to backticks: set prompt="`hostname` %" The backticks tell the shell to execute the command inside them, and use the output instead. Single quotes in that context have no special meaning, which is why you see the literal 'hostname' as your prompt. Ken On Tue, 17 Oct 2000, Rick Hamell wrote: > Taking my first steps into scripting, my first task is to figure > out how to customize csh. Problem is, I can't seem to make something like > set prompt="'hostname' %" work... The command hostname dosen't seem to > work at all. I figure I've got the syntax wrong, but where... ? :) What I > get is 'hostname' btw. Thanks much! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0010181345010.73250-100000>