From owner-freebsd-questions Fri Feb 14 7:53:34 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 16F2637B401 for ; Fri, 14 Feb 2003 07:53:32 -0800 (PST) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6494043FBD for ; Fri, 14 Feb 2003 07:53:28 -0800 (PST) (envelope-from fbsd-q@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.6/8.12.6) with ESMTP id h1EFtTCT016058; Fri, 14 Feb 2003 16:55:30 +0100 (CET) (envelope-from stable@ei.bzerk.org) Received: (from stable@localhost) by ei.bzerk.org (8.12.6/8.12.6/Submit) id h1EFtTvB016057; Fri, 14 Feb 2003 16:55:29 +0100 (CET) Date: Fri, 14 Feb 2003 16:55:29 +0100 From: Ruben de Groot To: "Colin J. Raven" Cc: "'BSD Questions'" Subject: Re: syntax problem in /etc/csh.login Message-ID: <20030214155529.GA15986@ei.bzerk.org> References: <3E4CDDF9.50207@ant.uni-bremen.de> <000001c2d42e$b3811300$1500000a@scrk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001c2d42e$b3811300$1500000a@scrk.com> User-Agent: Mutt/1.4i 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 On Fri, Feb 14, 2003 at 02:40:17PM +0100, Colin J. Raven typed: > > +> > 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! > Well, thanks! > > +> > but beyond that I'm stumped. > +> > +> beyond that comes 'man csh'. > Oh for goodness sakes!!!! > > I am sure it does but reading man csh is a 2 week exercise.....which > considering I don't normally use csh, but a few of my user opoulation > does, it's not likely that I am going to absorb all the huge amount of > information in man csh for a shell I never use personally. I agree the csh manpage is quite large. But what about google? The first hit in a search for "csh conditional statements" is a tutorial with examples of exactly what you're asking. > +> Sorry, but you have to read it yourself! ;-) > +> > +> Hint: As the name of the shell suggests, the syntax quite C-like. > > Response to "Hint" > Most assuredly your response indicates substantial knowledge of C. > Unlike you however, I am not a programmer but "catch on quickly" to most > things.....and my post was no more than asking someone to "jumpstart me" > which usually starts me on a reading binge in FURTHER pursuit of > knowledge. Right now I have absolutely no clue as to where to begin. > > On this list of all places, I did not expect the supercilious "RTFM" > response. It's uncalled for, it's unecessary and furthermore does not > speak well of your willingness to be of assistance to those less > knowledgeable than yourself. Instead it smacks of a (largely useless) > demonstration of what *you* know and others *don't* know. On the other hand, you might do >some< research before asking a question, especially since it was not a FreeBSD specific question. > I wonder...seriously....I wonder why you even elected to respond at > all???? Remaining silent would have been the elegant solution. > > Regards to all - as always. > -Colin > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message