PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > tcsh: continue: end not found. --- Arghh
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

tcsh: continue: end not found. --- Arghh

Réponse
 
LinkBack Outils de la discussion
Vieux 30/05/2007, 14h49   #1
rh0dium
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut tcsh: continue: end not found. --- Arghh

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

  Réponse avec citation
Vieux 30/05/2007, 17h32   #2
Icarus Sparry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: tcsh: continue: end not found. --- Arghh

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.
  Réponse avec citation
Vieux 30/05/2007, 18h08   #3
Michael Tosch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: tcsh: continue: end not found. --- Arghh


Perhaps the last line is not EOL terminated?
Or is there a hidden ^M somewhere?

--
Michael Tosch @ hp : com
  Réponse avec citation
Vieux 30/05/2007, 21h54   #4
rh0dium
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: tcsh: continue: end not found. --- Arghh

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.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h56.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10899 seconds with 12 queries