Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 2002 17:20:09 +0200
From:      Roman Neuhauser <neuhauser@bellavista.cz>
To:        mbettinger@championelevators.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: OT sed help
Message-ID:  <20020919152009.GA379@freepuppy.bellavista.cz>
In-Reply-To: <200209190938.35632.matt@championelevators.com>
References:  <200209190938.35632.matt@championelevators.com>

next in thread | previous in thread | raw e-mail | index | archive | help
# matt@championelevators.com / 2002-09-19 09:38:33 -0500:
> 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?

    untested:

    % grep -En '^\w{9,}' yourfile

-- 
begin 666 nonexistent.vbs
FreeBSD 4.7-RC
5:15PM up 2 days, 30 mins, 24 users, load averages: 0.01, 0.00, 0.00
end

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020919152009.GA379>