Can you send a sample of the data that you are parsing?

-----Original Message-----
From: LoneWolf [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 10, 2003 4:42 PM
To: [EMAIL PROTECTED]
Subject: CUt first and last line from a file


I'm parsing every file in a directory, cutting whitespace out (per a
previous request) and so far it is working great, but I have come across
a couple of things: 1.  I either need to cut the first and last line of
each file or 2.  I need to skip the line if one of the fields is empty.

I have tried to code 2, however the lines are not working right.

if ($comp_name ne " "){....}

leaves in the blank lines.  I have tried to use just single quotes, but
same results.  so the question is, how can I do both 1 and 2.  Some of
the pipe files I am playing with are going to only be 1 or 2 lines, and
parsing them out instead of just cutting the first and last lines and
loading them as-is into the database will be faster then trying to grep
for an empty, but grepping on the empty for other (much larger files)
would be best, so I need to be able to do both.

TIA!

Robert


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to