The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: Help in unix
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-16-2008
guest6 guest6 is offline
Registered User
 

Join Date: May 2008
Posts: 8
Thanks .. i removed spaces and now that error is gone..

I am getting an error in while loop. The error is

"[: too many arguments"

I am using the while loop because i wish to read first 3 lines from file2.txt and append them in file1.txt. Then run some program and delete the 3 lines appended. Then append the next 3 lines from file2.txt to file1.txt and run the program. I have to do this till all the lines in file2.txt have been read.

Could you suggest a way to delete the last three lines from file.

I appreciate your instant help.

Thanks
Reply With Quote