[geeks] Way to do this in AWK?

William S. wstan at xs4all.nl
Thu Jun 20 13:56:36 CDT 2002


I came up with this in sed. Just wondering how it
would be done in AWK. Generally what I want it to
do is take a file and prepend it to another file,
then trim the file to 15 lines.

Here is my sed solution:

cat file.txt log.txt | sed '15,$d' > hold.txt && mv hold.txt log.txt

-- 
Bill
Amsterdam, NL



More information about the geeks mailing list