![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| For loop in ksh..Please help.. | prashant43 | Shell Programming and Scripting | 4 | 08-29-2008 08:56 AM |
| while loop and CPU .. | nivea_jmd | High Level Programming | 1 | 08-27-2008 10:57 AM |
| while loop inside while loop | panknil | Shell Programming and Scripting | 0 | 01-07-2008 12:49 PM |
| While loop help need | bobo | UNIX for Dummies Questions & Answers | 2 | 09-18-2006 09:54 PM |
| how to get the similar function in while loop or for loop | trynew | Shell Programming and Scripting | 3 | 06-17-2002 12:09 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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, |
|
||||
|
Quote:
I the directory i have s.txt and st.txt both f1 and f2 should have the same value. It seems like comparison failed. $ ./st.txt s.txt st.txt s.txt st.txt ./st.txt: line 6: [s.txt st.txt: command not found |
|
||||
|
Quote:
Thanks quirkasaurus I'm all set. I wasn't using spaces before and after variable and "=" sing in the comparison. Thanks agian. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|