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 -->
  #2 (permalink)  
Old 05-26-2009
cambridge cambridge is offline
Registered User
  
 

Join Date: May 2009
Posts: 55
It looks to me like your problem is with this line:

Code:
cp $i idoc.dat
You haven't set the 'i' variable by this point, it is empty, hence the error from the 'cp' command - which expects two arguments. You don't set 'i' until a few lines later:

Code:
for i in 3526*.dat