The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #5 (permalink)  
Old 02-10-2009
sh_help sh_help is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 4
Quote:
Originally Posted by quirkasaurus View Post
try putting the comparisons within double quotes like so:

while [ "$f1" = "$f2" ]; do
I still get this error.

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