Hi there
Bill Becker wrote:
>The file could have made on a macrosloth platform
is this something vaguely defamitory like 'windoze' perchance? :)
>that uses the X'0D'
>and X'0A' combinations of line ending characters (I forget which goes
>first). The \012 is octal and represents 10 in decimal, the same as
>X'0A'.
>
>You may need to strip the extraneous crud from the file...........
>opening it in BBedit
Or you could harness some of the power of Perl to do the job for you ; ) :
#! perl -w
$file ='path:to:file';
open (IN ,$file)|| die " there was a problem: $!";
while (<IN>){
tr/\012//ds;
}
close (IN);
The above is just to highlight what you need to do - if you save this
a a script you need to edit $file every time you want to use it,
which makes it just as easy to open the file you want to change in an
editor or something. Alternatively saving it as a droplet after
making the following changes to get it to work:
#! perl -w
foreach $file (@ARGV){ # you now get the file name from here
open (IN ,$file)|| die " there was a problem: $!";
while (<IN>){
tr/\012//ds;
}
close (IN);
}
means you can drop a file/ bunch of files on it and the script will
do the rest for you.
HTH
Robin