[Prev][Next][Index][Thread]

How to do this in .cshrc file?



I have the following lines in my Sun's .cshrc file, and they
work great to change the prompt to the machine-name in all caps,
followd by the current directory, followed by the command-line #:
        set thismachine=`hostname | sed 's/\..*//' | tr 'a-z' 'A-Z'`
	alias cd     'cd \!*; set prompt="$thismachine`pwd`[\\!] "'
but when I try the same thing on my Alpha (OSF 1.3), it chokes on the
"set" line with "variable syntax".  I can't get it to do even:
	set thismachine=`hostname`

So, is there a way to set a variable to the output of a command in
a .cshrc in OSF?

I don't want to just "set thismachine=rover", because then I have to
have a different .cshrc file for every machine.

Thanks for any help,
Kevin


Follow-Ups: