[tpm] Fast(er) way of deleting X lines from start of a file

Stuart Watt stuart at morungos.com
Wed Sep 30 09:52:43 PDT 2009


I have been known to use sed for this, e.g.:

sed '1,1 d' <oldfile >newfile

The second "1" can be X, but I often have to delete a single header 
line, for example for a database bulk load file. The GnuWin32 version 
works well on Windows too, but usually needs double quotes for the 
command. sed is generally memory friendly, but has about the second 
worst command syntax ever invented. (There's a special award for edlin).

All the best
Stuart
-- 
Stuart Watt
ARM Product Developer
Information Balance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20090930/7858f8de/attachment.html>


More information about the toronto-pm mailing list