On Sun, Oct 01, 2006 at 06:58:00AM -1000, Tim Newsham wrote:
XML is a problem in search of a problem
It was a sad day when I discovered OS X and Solaris startup
scripts depending on XML files. I certainly would not mind more
compact and easily parsable alternatives like JSON and YAML.
Here
So, what is kind of tragic for me is that I still cannot parse my export
file for the data I seek. I know no programming language, I can't
follow half of what I have read, and I continue seeking a solution. I
must have come to a Linux users group. :-)
I have uploaded the file here.
So, what is kind of tragic for me is that I still cannot parse my export
file for the data I seek. I know no programming language, I can't
follow half of what I have read, and I continue seeking a solution. I
must have come to a Linux users group. :-)
I have uploaded the file here.
Vince Hoang wrote:
*eyes roll*
Vince made short order of it. Thanks, Vince. I don't know the lyrics
to eyes roll.
-Vince
--scott
Is this what you wanted? all in one line:
cat Music.txt | perl -pi -e 's/\r/\n/g;' | awk '{split($0,a,\t);
print \a[1]\\t\a[2]\\t\a[4]\}'
On 10/3/06, R. Scott Belford [EMAIL PROTECTED] wrote:
Vince Hoang wrote:
*eyes roll*
Vince made short order of it. Thanks, Vince. I don't know the
On Thu, Sep 28, 2006 at 10:01:03AM -1000, Tim Newsham wrote:
Since XML was brought up, does anyone want to try some
programming golf with their favorite language and XML library?
Eww.. why?
Primarily to flesh out the better XML parsers for those trying to
be language agnostic. I also have a
Primarily to flesh out the better XML parsers for those trying to
be language agnostic. I also have a morbid curiosity at seeing an
awk solution as suggested earlier in the thread. :)
XML is a problem in search of a problem
-Vince
Tim Newsham
http://www.thenewsh.com/~newsham/
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
On Tue, Sep 26, 2006 at 11:14:50PM -1000, R. Scott Belford wrote:
Jim Thompson wrote:
% awk -F \t '{printf(\%s\ %s %s\n, $1, $2, $3)}' itunes-export-file
I get this output in my terminal
Name Artist Composer
Jim's example prints fields 1, 2, and 3, but you want fields 1,
2, and 4. I
On Sep 27, 2006, at 11:54 PM, Vince Hoang wrote:
On Tue, Sep 26, 2006 at 11:14:50PM -1000, R. Scott Belford wrote:
Jim Thompson wrote:
% awk -F \t '{printf(\%s\ %s %s\n, $1, $2, $3)}' itunes-
export-file
I get this output in my terminal
Name Artist Composer
Jim's example prints
Jim Thompson wrote:
Oops, Vince is right.
Okay, so I paste this into my terminal window
cat Music.txt | awk '{FS=\t;RS=\r;printf(\%s\ %s %s\n, $1, $2,
$4)}' /tmp/scott /tmp/scott.out
and I get this on my osx machine
awk: i/o error occurred on /dev/stdin
source line number 1
and this
On Sep 28, 2006, at 12:15 AM, R. Scott Belford wrote:
Jim Thompson wrote:
Oops, Vince is right.
Okay, so I paste this into my terminal window
cat Music.txt | awk '{FS=\t;RS=\r;printf(\%s\ %s %s\n, $1,
$2, $4)}' /tmp/scott /tmp/scott.out
and I get this on my osx machine
awk: i/o
Since XML was brought up, does anyone want to try some
programming golf with their favorite language and XML library?
Eww.. why?
-Vince
Tim Newsham
http://www.thenewsh.com/~newsham/
13 matches
Mail list logo