Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Oops... | 7 comments | Create New Account
Click here to return to the 'Oops...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Oops...
Authored by: XSage on May 16, '03 12:42:35AM
Looks like I made a minor mistake while copying.
The last line of that code block looks like: else if (NF != 0) printf "%s\t%s\t%i:%i\n", $1, $2, int($7/60), $7%60 }'

Instead, printf should have a %.2i in the last field so that it will always print 2 digits.

The new code block should look like

awk '{gsub("\r", "\n"); print $0;}' Playlist.txt | \
awk 'BEGIN {FS="\t"} {if (NR == 1) printf "%s\t%s\t%s\n", $1, $2, $7; \
else if (NF != 0) printf "%s\t%s\t%i:%.2i\n", $1, $2, int($7/60), $7%60}'

Hehe, sorry.



[ Reply to This | # ]
Oops...
Authored by: macubergeek on May 24, '03 08:43:04PM

If you export from iTunes you should substitute Library.txt not Playlist.txt and then it works fine.



[ Reply to This | # ]