tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* sed question Quick summary
@ 1997-10-09  7:46 Dan Hubbard
  0 siblings, 0 replies; only message in thread
From: Dan Hubbard @ 1997-10-09  7:46 UTC (permalink / raw)
  To: tru64-unix-managers

The answer for this is seems to be use awk and not sed. 

eg:

awk '{print $3}' mush

Thanks



After looking through some resources I cannot find the answer on how to do
this with sed :

I have a sample file with the following in it:

good the bad and ugly

Each time this file gets created it will have a different 3rd word, but the
3rd word is always the one I want to extract.

So, I would like to sed the file and extract just the 3rd word ?

I can only see how to extract lines of information like:

sed -e '/b/!d' mush
returns the whole line ?

BTW: sed and awk are my only options on this one.

TIA

------------
Dan Hubbard

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-10-09  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-09  7:46 sed question Quick summary Dan Hubbard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox