How to remove the 10 first lines of a text file? Easy job with sed (Stream EDitor):
sed '1,10d' myFile
Example: removing 10 first lines of all text files in a directory.
for file in *.txt do sed '1,10d' $file > output_dir/new_${file} done
Further readings:
http://sed.sourceforge.net/sedfaq.html
http://www.gnu.org/software/sed/manual/sed.html
Advertisements
0 Responses to “Removing 10 first lines of a text file”