Date: Fri, 14 Feb 2003 13:15:53 +0100 From: Heinrich Rebehn <rebehn@ant.uni-bremen.de> To: "Colin J. Raven" <duiker@haggis.nl> Cc: BSD Questions <freebsd-questions@freeBSD.org> Subject: Re: syntax problem in /etc/csh.login Message-ID: <3E4CDDF9.50207@ant.uni-bremen.de> In-Reply-To: <001c01c2d422$083c47a0$1500000a@scrk.com> References: <001c01c2d422$083c47a0$1500000a@scrk.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Colin J. Raven wrote: > Greetings all! > Trying to create a custom login message for csh users. > I put the following in /etc/csh.login > <snip> > ############################################### > if [ `whoami` = user1 ]; then > echo "" > echo -e "This is a test message for user1" && \ > echo "" > else > if [ `whoami` = user2 ]; then > echo "" > echo -e "This is a test message for user2" && \ > echo "" > else > if [ `whoami` = test ]; then > echo "" > echo -e "This is a test message for user test" && \ > echo "" > fi > ################################################### > </snip> > and got an error upon subsequent login as user "test": > "if: Expression Syntax." (without parens) > > Anyone got any idea what I'm doing wrong? > Guess: csh syntax is different from bash You're right! > but beyond that I'm stumped. beyond that comes 'man csh'. Sorry, but you have to read it yourself! ;-) Hint: As the name of the shell suggests, the syntax quite C-like. > > Regards & TIA, > -Colin Reegards Heinrich -- Heinrich Rebehn University of Bremen Physics / Electrical and Electronics Engineering - Department of Telecommunications - E-mail: mailto:rebehn@ant.uni-bremen.de Phone : +49/421/218-4664 Fax : -3341 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?3E4CDDF9.50207>