|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to delete the first 10 lines in a text file?
In c shell script, I need to delete the first 10 lines in every input text file.
Thanks for you help. Thanh |
|
#2
|
|||
|
|||
|
one way:
Code:
tail -n +10 filename > tmp.tmp mv tmp.tmp filename |
|
#3
|
|||
|
|||
|
Another way:
sed -e '1,10d' filename > tmpfile mv tmpfile filename |
|
#4
|
|||
|
|||
|
Thanks so much!
Both answers work great! |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > How to delete the first 10 lines in a text file? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|