Re: Cat and Dos2unix Command Line Utilities?

2005-07-11 Thread Ken Williams
r//d" Because using 'env' doesn't preserve switches. Personally, I use a tcsh alias: % which dos2unix dos2unix:aliased to perl -pi -e "tr/\r//d" But Chris' script could become: #!/usr/bin/perl -pi tr/\r//d which would save one level of processes but no longer search the $PATH. -Ken

Re: Cat and Dos2unix Command Line Utilities?

2005-07-08 Thread Chris Devers
y trying to save you a line. :-) Yeah, but it doesn't really matter how complex the script is, so long as you can just do a $ dos2unix file.txt and get back a clean result. If I was going to make any modifications to the file, rather than simplify it, I'd force it to quit ra

Re: Cat and Dos2unix Command Line Utilities?

2005-07-08 Thread Joseph Alotta
On Jul 8, 2005, at 9:26 PM, Chris Devers wrote: #!/bin/sh perl -pi -e "tr/\r//d" Hi Chris, I tried to call perl directly. But this does not work at all. Does anyone know why? #!/usr/bin/env perl -pi -e "tr/\r//d" See, I was only trying to save you a line. :-) Joe.

Re: Cat and Dos2unix Command Line Utilities?

2005-07-08 Thread Chris Devers
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 lite

Re: Cat and Dos2unix Command Line Utilities?

2005-07-08 Thread Daniel Staal
are seeing are actually caused by a bug in Pod::Parser (I reported it to the author LONG time ago but no reply). You can install the distro and use it just fine despite these errors. In the Makefile.PL is a workaround for Unix-like systems (using cat and dos2unix). Does MacOS come with cat an

Cat and Dos2unix Command Line Utilities?

2005-07-08 Thread Lola Lee
uthor LONG time ago but no reply). You can install the distro and use it just fine despite these errors. 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

Re: dos2unix... and other

2002-10-07 Thread Puneet Kishor
Bruce Van Allen wrote: > At 1:23 PM -0500 2002-10-07, Puneet Kishor wrote: > >> Bruce Van Allen wrote: >> >>> At 1:01 PM -0500 2002-10-07, Puneet Kishor wrote: >>> s/ +/ /g; seems to work just as well. Which begs the question... why even have \s? maybe because tmtowtdi?! >

Re: dos2unix... and other

2002-10-07 Thread Bruce Van Allen
At 1:23 PM -0500 2002-10-07, Puneet Kishor wrote: >Bruce Van Allen wrote: >> At 1:01 PM -0500 2002-10-07, Puneet Kishor wrote: >> >>> s/ +/ /g; >>> >>> seems to work just as well. Which begs the question... why even have >>> \s? maybe because tmtowtdi?! >>> >> \s stands for "white space": [ \

Re: dos2unix... and other

2002-10-07 Thread Puneet Kishor
Bruce Van Allen wrote: > At 1:01 PM -0500 2002-10-07, Puneet Kishor wrote: > >> s/ +/ /g; >> >> seems to work just as well. Which begs the question... why even have >> \s? maybe because tmtowtdi?! >> > > \s stands for "white space": [ \t\n\r\f]. yes, I know that ;-) which is why I am asking wh

Re: dos2unix... and other

2002-10-07 Thread Bruce Van Allen
At 1:01 PM -0500 2002-10-07, Puneet Kishor wrote: >s/ +/ /g; > >seems to work just as well. Which begs the question... why even have >\s? maybe because tmtowtdi?! > \s stands for "white space": [ \t\n\r\f]. HTH 1; -- - Bruce __bruce_van_allen__santa_cruz_ca__

Re: dos2unix... and other

2002-10-07 Thread Puneet Kishor
John Delacour wrote: > At 5:46 pm +0200 6/10/02, Adriano Allora wrote: > >> When I use it in a regexp (s/\s+/\s/g;)(I want it works to singularize >> all the multi-whitespaces), the Terminal tells me: >> Unrecognized escape \s passed through at cleaner line 27. > > > \s means ANY white space c

Re: dos2unix... and other

2002-10-06 Thread Rich Morin
At 5:46 PM +0200 10/6/02, Adriano Allora wrote: >Now I have another problem: the 5.6 version perl on jaguar doesn't accept >the escape character \s, does it? >When I use it in a regexp (s/\s+/\s/g;)(I want it works to singularize >all the multi-whitespaces), the Terminal tells me: >Unrecognized es

Re: dos2unix

2002-10-06 Thread John Delacour
At 7:54 pm +0200 30/9/02, Adriano Allora wrote: >On the one hand I didn't express myself very well, but for the other >hand I found other aspects of the problem. > >Actual situation: I work with mac osx.2, vi editor, a pack of dos >files to work on. >When I open my files with vi I see some string

Re: dos2unix... and other

2002-10-06 Thread John Delacour
At 5:46 pm +0200 6/10/02, Adriano Allora wrote: >When I use it in a regexp (s/\s+/\s/g;)(I want it works to >singularize all the multi-whitespaces), the Terminal tells me: >Unrecognized escape \s passed through at cleaner line 27. \s means ANY white space character, so in your substitution patt

Re: dos2unix... and other

2002-10-06 Thread Adriano Allora
Hi to all, and thank you for the solutions you adviced me about the dos2unix problem (when I saw with the cat command that nvi doesn't change the content files I decided to substitute all the line endings with \n and stop there). Now I have another problem: the 5.6 version perl on j

Re: dos2unix

2002-09-30 Thread Charles Albrecht
At 7:54 PM +0200 9/30/2002, Adriano Allora wrote: >On the one hand I didn't express myself very well, but for the other hand I found >other aspects of the problem. > >Actual situation: I work with mac osx.2, vi editor, a pack of dos files to work on. >When I open my files with vi I see some strin

Re: dos2unix

2002-09-30 Thread Chris Devers
On Mon, 30 Sep 2002, Chris wrote: > Anyone else got a favorite editor for writing/converting text on MacOS > X.2 when Unicode is important? Vim claims to be able to do Farsi, Chinese, and other languages with non western character sets & non western text flow, but personally I've never had to de

Re: dos2unix

2002-09-30 Thread Chris
You are probably seeing an artifact of encoding mismatch. The Terminal will display UTF-8, but vi doesn't know about UTF-8, and is some of your text coming from Classic MacOS or a DOS box? I find I need to use an editor like jEdit which allows me good control over the text encoding I intend.

Re: dos2unix

2002-09-30 Thread Sherm Pendley
On Monday, September 30, 2002, at 01:56 PM, Chris Devers wrote: > Alternatively, if you can't find a good clean way to translate documents > from one character set to another, you'll have to hand roll one. Surely > there has to be tools for this but off the top of my head I can't think > of > an

Re: dos2unix

2002-09-30 Thread Chris Devers
On Mon, 30 Sep 2002, Adriano Allora wrote: > Actual situation: I work with mac osx.2, vi editor, a pack of dos files > to work on. In particular, they seem to be in some kind of Windowsish character set that doesn't seem to be translating cleanly to what Vi/$terminal/OSX wants to be dealing with

Re: dos2unix

2002-09-30 Thread Adriano Allora
On the one hand I didn't express myself very well, but for the other hand I found other aspects of the problem. Actual situation: I work with mac osx.2, vi editor, a pack of dos files to work on. When I open my files with vi I see some strings instead of stressed letters and signs. For instanc

Re: dos2unix

2002-09-26 Thread Ken Williams
the following in my ~/.login file: alias mac2unix 'perl -pi -e "tr/\r/\n/"' alias dos2unix 'perl -pi -e "tr/\r//d"' -Ken On Friday, September 27, 2002, at 03:26 AM, Robin wrote: > On Friday, September 27, 2002, at 01:57 am, Adriano Allora wrot

Re: dos2unix

2002-09-26 Thread Robin
On Friday, September 27, 2002, at 01:57 am, Adriano Allora wrote: > I need to convert some dos files in unix files, are there commands I > can use (like recode)? I'm assuming you mean text files and you need to convert line endings. You'll need to edit the @files array putting in the full pat

dos2unix

2002-09-26 Thread Adriano Allora
hi to all! I need to convert some dos files in unix files, are there commands I can use (like recode)? thanks a lot, adr