|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi All,
Fairly simple shell script or so I thought. I can't get rid of the error: 'tcsh: continue: end not found.' Can anyone with a better set of eyes look this over and me out on this. Thanks!! ---- #!/bin/tcsh set cpath = 'a b c d e f' set npath = 'c b a' set droppath='f' foreach x ($cpath) set match = 0 foreach y ($npath) echo "Comparing New Path item $y to Old Path $x" if ($x == $y) then set match=1 break endif end echo "Value of the Match = $match" if ( ! $match ) then set match = 0 foreach z ($droppath) echo " Comparing Match $x to $z to determine if it can be dropped" if ( $z == $x ) then set match = 1 break endif end echo " Value of the Match = $match" if ( $match ) then echo " >> We need to ignore path $x it's excluded" else echo " >> We need to add $x to our path" endif echo " -- Falling out of match loop" endif continue end |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Wed, 30 May 2007 06:49:52 -0700, rh0dium wrote:
> Hi All, > > Fairly simple shell script or so I thought. I can't get rid of the > error: 'tcsh: continue: end not found.' Can anyone with a better set of > eyes look this over and me out on this. > > Thanks!! It looks fine here, with tcsh 6.14 Of course the "continue" is not needed on the penultimate line of your script. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Perhaps the last line is not EOL terminated? Or is there a hidden ^M somewhere? -- Michael Tosch @ hp : com |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On May 30, 10:08 am, Michael Tosch
<eed...@NO.eed.SPAM.ericsson.PLS.se> wrote: > Perhaps the last line is not EOL terminated? > Or is there a hidden ^M somewhere? > > -- > Michael Tosch @ hp : com OMG!! You have Solved it. Perfect - A second set of eyes was needed. Thanks so much. |
|
![]() |
| Outils de la discussion | |
|
|