From owner-freebsd-questions Fri Feb 14 5:17:46 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E85EC37B401 for ; Fri, 14 Feb 2003 05:17:44 -0800 (PST) Received: from mx.ant.uni-bremen.de (antsrv1.ant.uni-bremen.de [134.102.176.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CDA843FA3 for ; Fri, 14 Feb 2003 05:17:44 -0800 (PST) (envelope-from rebehn@ant.uni-bremen.de) Received: from wewer.ant.uni-bremen.de ([134.102.176.85] helo=ant.uni-bremen.de) by antsrv1.ant.uni-bremen.de with esmtp (Exim 3.36 #1) id 18jfik-000139-00; Fri, 14 Feb 2003 14:17:38 +0100 Message-ID: <3E4CDDF9.50207@ant.uni-bremen.de> Date: Fri, 14 Feb 2003 13:15:53 +0100 From: Heinrich Rebehn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Colin J. Raven" Cc: BSD Questions Subject: Re: syntax problem in /etc/csh.login References: <001c01c2d422$083c47a0$1500000a@scrk.com> In-Reply-To: <001c01c2d422$083c47a0$1500000a@scrk.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Colin J. Raven wrote: > Greetings all! > Trying to create a custom login message for csh users. > I put the following in /etc/csh.login > > ############################################### > 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 > ################################################### > > 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