Quote:
Originally Posted by radoulov
Try changing the < operator:
Code:
while [ "$var" -lt 1 ]
do
echo "while"
done
|
thanks, it works but not in my script because it says
line 29 [0: not found (????)
so my code is:
Quote:
#!/bin/sh
var=0
echo $var
LOGFILE=`mktemp -t svn_checkout.XXXXXX`
ICONPATH="`dirname $0`/svn.xpm"
list=`ssh ruben@192.168.1.3 "ls /esp-server/svn"`
URL=`zenity --entry --title="Subversion: Checkout" --text="$list
Enter repository folder according to the the aboves:" --entry-text="" --width=400 --window-icon="$ICONPATH" 2>&1`
if [ $? -eq 0 ] ; then
svn checkout svn+ssh://ruben@192.168.1.3/esp-server/svn/$URL &> $LOGFILE & pid1=$!
echo $pid1
zenity --progress --pulsate --auto-kill & pid2=$!
echo $pid2
DIR=/proc/$pid1
echo $DIR
while [$var -lt 1]
do
echo "while"
if [ -d $DIR ] ; then
echo "does exist"
else
echo "does not exist"
fi
done
rm -f $LOGFILE
fi
echo "end"
|
and my line 29 is the last fi. And I have a lot of echo to show me the status.
Now I realy don't know why it doesn't enter in the while
Can you help me??
thanks