Matthew Bettinger <[EMAIL PROTECTED]> wrote:
 > I have a flat file that I need to import into a database.  The first field of 
 > the file is a part number which cannot exceed more than 8 characters.
 > 
 > Does anyone know how I can use  sed to count the characters in the first field 
 > and if there are more than 8 print out a list?

It's probably easiest to use awk for that job:

   awk '(length($1) > 8)' flatfile.txt

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 M�nchen
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to