On Thu, Sep 28, 2006 at 12:08:21AM -1000, Jim Thompson wrote: > On Sep 27, 2006, at 11:54 PM, Vince Hoang wrote: > > >I also had to tell awk to use a carriage-return as the newline > >instead of linefeed when reading in the file. My version with > >extraneous use of cat is: > > Are you using Windows or something?
No cygwin environment to get cat/awk for many years now, just python and ruby on my win32 systems these days. > > cat itunes-export-file \ > > | awk '{FS="\t";RS="\r";printf("\"%s\" %s %s\n", $1, $2, $4)}' The snippet above was tested on 10.4.7 using an export from iTunes 6.0.5 on an i386 Mac Mini and not an export from Scott's system. I originally had FS and RS wrapped inside a BEGIN block, but was able to squeeze it down to what you see above. Scott sent me his export privately and I still had to translate the newlines, but my awk example broke and had to revert to using a BEGIN block: awk 'BEGIN{FS="\t";RS="\r"}{printf("\"%s\" %s %s\n", $1, $2, $4)}' -Vince