From owner-freebsd-questions Wed May 10 22:14:24 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail1.noc0.hsacorp.net (mail1.noc0.hsacorp.net [208.247.171.140]) by hub.freebsd.org (Postfix) with ESMTP id 5A52437B738 for ; Wed, 10 May 2000 22:14:12 -0700 (PDT) (envelope-from jconner@enterit.com) Received: from [24.216.177.146] (HELO default.enterit.com) by mail1.noc0.hsacorp.net (CommuniGate Pro SMTP 3.2.4) with ESMTP id 11944593; Thu, 11 May 2000 01:14:06 -0400 Message-Id: <4.3.1.2.20000511011740.01ec78e0@pseudonet.org> X-Sender: jconner@mail.enterit.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Thu, 11 May 2000 01:20:17 -0400 To: "Duke Normandin" , "'freebsd-questions@FreeBSD.org'" From: Jim Conner Subject: Re: csh script syntax error In-Reply-To: <000801bfbadf$b95fcd40$fbdba7d1@dnormandinfreewwweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 06:07 PM 5/10/00 -0600, Duke Normandin wrote: >I'm running 3.3R... >The following script ( a port from tcsh) fails with the error message >if: expression syntax error > >#!/bin/csh ># >if ( mv $* ~/tmp ) then > echo "The files have been moved! To remove them " > echo "use the 'purge' command " >else > echo "Something's haywire! Files not moved. " >endif Well...Im not too familiar with csh, but wouldn't the fact that there is a misplacement of punctuation here? #!/bin/csh if (mv $* ~/tmp); then # notice the ; echo "blah" else echo "another blah" fi # endif vs fi...not sure. Im not sure if csh uses endif if fi. Probably endif (realizing that csh is a bit awkward from what Im use to) Jim >I can't figure this puppy out! Tia..... > >-duke > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Today's errors, in contrast: Windows - "Invalid page fault in module kernel32.dll at 0032:A16F2935" UNIX - "segmentation fault - core dumped" Humanous Beingsus - "OOPS, I've fallen and I can't get up" ------------------------------- Jim Conner NOTJames jconner@enterit.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message