From owner-freebsd-questions Fri Feb 14 7:58:36 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 3645037B401 for ; Fri, 14 Feb 2003 07:58:34 -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 6A5A443F75 for ; Fri, 14 Feb 2003 07:58:33 -0800 (PST) (envelope-from rebehn@ant.uni-bremen.de) Received: from p5086620b.dip0.t-ipconnect.de ([80.134.98.11] helo=ant.uni-bremen.de) by antsrv1.ant.uni-bremen.de with asmtp (Exim 3.36 #1) id 18jiEN-0001NC-00; Fri, 14 Feb 2003 16:58:27 +0100 Message-ID: <3E4D121E.30004@ant.uni-bremen.de> Date: Fri, 14 Feb 2003 16:58:22 +0100 From: Heinrich Rebehn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 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: <000001c2d42e$b3811300$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: > > +> > 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. > > +> 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. > > I wonder...seriously....I wonder why you even elected to respond at > all???? Remaining silent would have been the elegant solution. Hey man, cool down :-) man pages *are* the primary source of information. Also i don't know the csh syntax myself (only use sh/bash), that's why i referred you to the man page. I also have *very* limited knowledge about C, but the name "c-shell" really comes from C. This happens to be one of the things that i remember from my first UNIX course some 10 years ago. The csh man page is in fact very long, but you don't have to read it completely. I had a look into it myself, by browsing and searching (use the "/" (slash) button) one can find the "if" syntax quite quickly. Sorry for having hurt your feelings :-) Kond regards, Heinrich To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message