Wow!  It only took us two days to find a resonable solution ;)


On Thu, 29 Jun 2006, Bill Cunningham wrote:

I know the original question was to truncate the first 300 lines of the file 
but why do that when you could just solve the problem without modifying the 
original file at all. If the purpose is to not send the first 300 bytes to a 
command then simply use the tail command:

tail -300 original_file

So if you wanted to feed the original file to mysql you could use:

mysql < tail -300 original_file

( I'm a little rusty so man tail to find the exact command.) I'm of the belief 
of keep it simple. Why modify the file at all?

Bill Cunningham

----- Original Message ----
From: P_Thorne <[EMAIL PROTECTED]>
To: rlug@rlug.org
Sent: Thursday, June 29, 2006 7:08:39 PM
Subject: [RLUG] Re: quick question

This idea wouldn't satisfy the original premise of the thread that the
file couldn't exist twice:
Has anyone thought of using the shell command "split"?   I have used
split or csplit to vi edit small portions of very large ascii files,
recombining the big file using "cat".   It would probably not have been
any faster than using "sed" as the original author did, but you might be
able to do more complex editing.


_______________________________________________
RLUG mailing list
RLUG@rlug.org
http://lists.rlug.org/mailman/listinfo/rlug





_______________________________________________
RLUG mailing list
RLUG@rlug.org
http://lists.rlug.org/mailman/listinfo/rlug


_______________________________________________
RLUG mailing list
RLUG@rlug.org
http://lists.rlug.org/mailman/listinfo/rlug

Reply via email to