On Fri, 8 Jul 2005, Lola Lee wrote:

In the Makefile.PL is a workaround for Unix-like systems (using cat and dos2unix). Does MacOS come with cat and dos2unix "command-line" utilities? If so, what are they called? And what is the value of $^O? (darwin I think?)

Does this guy literally mean MacOS, or does he mean MacOS X ?

OSX is Unix, so it includes a copy of cat at /bin/cat, just like most other Unix variants do.

dos2unix doesn't seem to be available, but personally I have a trivial one in my ~/bin directory that's just:

    $ cat ~/bin/dos2unix
    #!/bin/sh
    perl -pi -e "tr/\r//d"
    $

Works a charm. Whatever this guy is doing that needs dos2unix, chances are excellent that he could get the same result with Perl itself with little or no effort. For that matter, chances aren't bad that he doesn't need to use `cat` either, as Perl can do that one too, but then I haven't actually looked at this package so I don't know how he's trying to use it; maybe it isn't really a Useless Use Of Cat :-)



--
Chris Devers

Reply via email to