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 -->
  #3 (permalink)  
Old 04-25-2008
vrms vrms is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 16
Quote:
Originally Posted by jim mcnamara View Post
sed or awk are good choices - here is sed:
Code:
for file in  `ls *.txtdatafile`
do
      sed '7,8d' $file > tmp.tmp
      mv tmp.tmp $file
done
Thanks for the Reply Jim

Unfortunately this sends them all into one big tmp.file. I need to create a new text file for every single text file that is in the directory.