The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-10-2009
sh_help sh_help is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 4
help with While loop and CD

I am new to shell scripting. I am using cygwin to run my scripts.
I ran this script from c:\shell

Here is the script i have.

cd //biz/stcurrentbuilds/1_0
f1=`dir`
echo $f1
f2=`dir`
echo $f2
while [$f1=$f2]
Do
f2=`dir`
echo "No new build"
done

When i run i get error
./ st.txt: line 10: syntax error near unexpected token `done'

Can someone please let me know what is wrong with my script?

Thanks,