Bourne shell syntax problem?

Barbara Nash barb at library.calpoly.edu
Sat Apr 20 11:59:23 AEST 1991


croten at 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 at library.calpoly.edu
Kennedy Library Computer Services                  bnash at polyslo.calpoly.edu
Disclaimer:  My opinions are my own, the library has enough without taking mine.



More information about the Comp.unix.questions mailing list