Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!petunia!news From: barb@library.calpoly.edu (Barbara Nash) Newsgroups: comp.unix.questions Subject: Re: Bourne shell syntax problem? Message-ID: <280fa07b.64d8@petunia.CalPoly.EDU> Date: 20 Apr 91 01:59:23 GMT Distribution: usa Organization: Computer Services - Kennedy Library, Cal Poly SLO Lines: 53 croten@ltpsun.gsfc.nasa.gov (Charles D. Roten) says....... > > I am having trouble getting a Bourne shell to run, and have come to >suspect that the problem is in the section where I parse the variables. >The script is rather long (~260 lines) so I will only include the suspect >portion. > >-------------------- script follows -------------------- >#!/bin/sh > > [comments deleted] > [lotsa stuff deleted for brevity] > > [stuff that already works deleted] > ># Switch on the verbosity. > >set -x > ># Go to the 'working' directory >cd $tmpdir > ># Now, parse the rest of the arguments, for cases where there are 1 or more ># arguments. > >for i in $*; do > case $i in [lotsa case stuff deleted for brevity] > *) if test "$data" = ""; then > data=$i > elif test "$normal = ""; then ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You've only got three " marks here, you need another after "$normal. This is prolly why you're getting an unexpected > > I would greatly appreciate an explanation of the the nature of the >goof. Thanks in advance. > Sure, no problem. Forgetting a quote seems to be my favorite shell proggin' error as well. =-) Good luck, Barb -- -------------------------------------------------------------------------------- Barbara Nash, Asst. SysAdmin barb@library.calpoly.edu Kennedy Library Computer Services bnash@polyslo.calpoly.edu Disclaimer: My opinions are my own, the library has enough without taking mine.