Re: Linfeed Trick

From: Houghton,Andrew <houghtoa_at_nyob>
Date: Wed, 26 May 2004 09:49:22 -0400
To: CODE4LIB_at_LISTSERV.ND.EDU
> From: Roy Zimmer [mailto:ZIMMER_at_wmich.edu]
> Sent: 26 May, 2004 08:57
> Subject: Re: [CODE4LIB] Linfeed Trick
>
> Thom Hickey wrote about the "linefeed trick". That was a bit
> of a "duh" moment for me. But then, I've seldom had the need
> to grep a marc format file.
>
> He also mentioned wc -l working better with that. I've gotten
> around that with a short Perl program: go to
>
>   http://homepages.wmich.edu/~zimmer/marc_index.html
>
> and look for marccount.pl.
>
> It doesn't require any modifications to the marc file, but I
> suspect that others have written something like that, too.

People must really like to write code!  What's wrong with
using tools already available to you?

cat *.mrc | tr \035 \012 | wc -l

Seems to work just peachy for me, without writing Java, Perl,
Python, etc.  Maybe I missed something along the way...


Andy.
Received on Wed May 26 2004 - 08:52:15 EDT