Hi all... 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 I can do it with normal Linux file names, but the !"§$!" M$ names with blanks are giving me a PIA! Thanks, JIM -- 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
James Hatridge
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.
HI all... This worked! Thanks, JIM On Wednesday 26 May 2004 20:39, Alexandr Malusek wrote:
James Hatridge
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
On Wednesday 26 May 2004 18:07, James Hatridge wrote:
Hi all...
Hi
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"
provided that your filenames are delimited by double quotes and you have them in file foo.txt, then something like: awk -F'"' ' { print $2 }' foo.txt shoul do the job. After -F it's a double quote enclosed in single quotes. -Stathis.
I would like to make a list with lines that looks like this:
4.3M "\t" Frankenstein -'31 Chapter 01o13.Mp3
I can do it with normal Linux file names, but the !"Β§$!" M$ names with blanks are giving me a PIA!
Thanks,
JIM
-- 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
participants (3)
-
Alexandr Malusek
-
James Hatridge
-
rouvas