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


Click here to return to the 'An alias that uses perl' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An alias that uses perl
Authored by: logan on Mar 07, '02 12:15:36AM
Yeesh. A one-liner? How about a zero-character script that does the same thing? ;)
alias mac2unix="perl -p0015l0012e '' -i $*"


[ Reply to This | # ]
An alias that uses perl
Authored by: TheGS on Mar 07, '02 12:25:27AM

I like yours better — there's less time wasted compiling that 'tr' operation. TMTOWTDI, in any case.



[ Reply to This | # ]
An alias that uses perl
Authored by: oink on Mar 08, '02 01:52:48PM

re: alias mac2unix="perl -p0015l0012e '' -i $*"

Hmm, wow.

Now all I need is to fit this into an applescript, the following doesn't work.

on open fileList
repeat with x in fileList
if folder of (info for x) is not true then
set y to POSIX path of x
do shell script ("perl -p0015l0012e '' -i" & y)
end if
end repeat
end open




[ Reply to This | # ]
An alias that uses perl
Authored by: ret on Mar 14, '02 09:35:34PM

That's an l (lower case "L"), not a "|" pipe. See what a difference that makes to your script.

cheers
RET



[ Reply to This | # ]