From owner-freebsd-questions Thu Sep 19 8:20:26 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B303037B401 for ; Thu, 19 Sep 2002 08:20:25 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 79DC643E65 for ; Thu, 19 Sep 2002 08:20:24 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 32730 invoked from network); 19 Sep 2002 15:20:23 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 19 Sep 2002 15:20:23 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id CF0A52FDAB2; Thu, 19 Sep 2002 17:20:09 +0200 (CEST) Date: Thu, 19 Sep 2002 17:20:09 +0200 From: Roman Neuhauser To: mbettinger@championelevators.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: OT sed help Message-ID: <20020919152009.GA379@freepuppy.bellavista.cz> Mail-Followup-To: mbettinger@championelevators.com, freebsd-questions@FreeBSD.ORG References: <200209190938.35632.matt@championelevators.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209190938.35632.matt@championelevators.com> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG # 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