Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: awk question...
  • From: James Hatridge <James.Hatridge@xxxxxxxx>
  • Date: Thu, 27 May 2004 17:13:45 +0200
  • Message-id: <200405271713.47818.James.Hatridge@xxxxxxxx>
HI all...

This worked!

Thanks,

JIM
On Wednesday 26 May 2004 20:39, Alexandr Malusek wrote:
> James Hatridge <James.Hatridge@xxxxxxxx> writes:
> > I have a list with lines that looks like this:
> >
> > -r-xr-xr-x 1 4.3M 2002-01-07 13:04 "Frankenstein -'31 Chapter 01o13.Mp3"
> >
> > I would like to make a list with lines that looks like this:
> >
> > 4.3M "\t" Frankenstein -'31 Chapter 01o13.Mp3
>
> Split the line into an array a on '"', e.g.
>
> awk '{split($0,a,"\""); printf("%s\t%s\n",$3,a[2]);}'
>
> --
> A.M.

--
Jim Hatridge
Linux User #88484
------------------------------------------------------
                 BayerWulf
           Linux System # 129656
         The Recycled Beowulf Project
  Looking for throw-away or obsolete computers and parts
   to recycle into a Linux super computer

WartHog Bulletin
Info about new German Stamps
http://www.fuzzybunnymilitia.org/~hatridge/bulletin

Viel Feind -- Viel Ehr'
Anti-US Propaganda stamp collection
http://www.fuzzybunnymilitia.org/~hatridge/collection

< Previous Next >