Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] awk question...
  • From: Alexandr Malusek <Alexandr.Malusek@xxxxxxxxxx>
  • Date: Wed, 26 May 2004 20:39:26 +0200
  • Message-id: <86brkbyqw1.fsf@xxxxxxxxxxxxxxxxx>
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.

< Previous Next >
Follow Ups
References