Date: Thu, 11 May 2000 01:20:17 -0400 From: Jim Conner <jconner@enterit.com> To: "Duke Normandin" <dnormandin@freewwweb.com>, "'freebsd-questions@FreeBSD.org'" <freebsd-questions@FreeBSD.ORG> Subject: Re: csh script syntax error Message-ID: <4.3.1.2.20000511011740.01ec78e0@pseudonet.org> In-Reply-To: <000801bfbadf$b95fcd40$fbdba7d1@dnormandinfreewwweb.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.3.1.2.20000511011740.01ec78e0>