🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: best.general
Article #1660

Re: Examining strings in files

#1660
From: Zenin
Date: Mon, 06 Nov 1995 00:00
23 lines
1477 bytes
Jimmy Aitken <petejim@shellx.best.com> wrote:
	>snip<
: If this case you could try:
: perl -ne 'print "$1\n" if /\sPRIV:\s(.*?)\s/;' datafile

	And yet another way...

		grep PRIV: datafile | sed "s/^.*PRIV: //"

	-can you tell I like sed... :)

	The first part blows away any lines that don't contain "PRIV:"
	and the second part blows away everything before the PRIV:,
	the PRIV: it's self, and the space after it.  With your example
	it will return:

132.634.757.245 blah blah blah
274.34.71.25 blah blah blah

	Hope this helps. :)

-Zenin
zenin@best.com
Technical Details
Message-ID: <47n1ui$l93@shellx.best.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <47jf89$k7c@shellx.best.com> <x7n3aai5hh.fsf@glx.com> <47kdad$ap7@shellx.best.com> <47ldlf$8oe@shellx.best.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f9f6d,4d51e96cce84d80f
X-Google-Attributes: gidf9f6d,public
X-Google-Thread: 161bbf,4d51e96cce84d80f
X-Google-Attributes: gid161bbf,public
X-Google-Thread: 11488e,4d51e96cce84d80f
X-Google-Attributes: gid11488e,public
X-Google-Thread: fd796,81754fefbd7cf85c
X-Google-Attributes: gidfd796,public
From: Zenin <zenin@shellx>
Subject: Re: Examining strings in files
Date: 1995/11/06
Message-ID: <47n1ui$l93@shellx.best.com>
X-Deja-AN: 118856542
sender: zenin@shellx.best.com
references: <47jf89$k7c@shellx.best.com> <x7n3aai5hh.fsf@glx.com> <47kdad$ap7@shellx.best.com> <47ldlf$8oe@shellx.best.com>
organization: Rocky Horror, Indecent Exposure (Berkeley, CA)
followup-to: best.general,best.schaft,best.www,comp.infosystems.www.authoring.cgi
newsgroups: best.general,best.schaft,best.www,comp.infosystems.www.authoring.cgi