Hi,
Thanks to all who commented. They are all correct. John Joseph's suggestion
to use #!/usr/bin/per; -w would work too. But Jason's suggestion below
pointed me to the solution. When the command perl test.pl work, right there
I realize file format might be suspect. I pulled out my HEX editor
Hi Billy,
unix2dos
#!/usr/local/bin/perl -w
while () {
chomp;
if ( $0=~m/dos2unix$/ ) {
print "$_\n";
} else {
print "$_\r\n";
}
}
dos2unix
#!/usr/local/bin/perl -w
while () {
chomp;
if ( $0=~m/dos2unix$/ ) {
print "$_\n";
} else {
print "$_\r\n";
}
}
On Friday
Billy Joedono writes ..
>More question: how can I force vi to show these, or better yet, how can
>I get dos2unix or unix2dos in Linux?
even better - get an FTP program that does the line-ending conversions for
you on the fly .. most GUI FTP programs will do this these days .. and
they'll usuall
On Fri, 27 Apr 2001, Billy Joedono wrote:
[...]
> Convert to regular Unix format and problem solved! More question: how can I
> force vi to show these, or better yet, how can I get dos2unix or unix2dos
> in Linux?
perl -i -pe 's/\r\n/\n/' file_to_be_converted_to_unix_lines.txt
perl -i -pe 's/\
Ask Bjoern Hansen writes ..
>On Fri, 27 Apr 2001, Billy Joedono wrote:
>
>[...]
>> Convert to regular Unix format and problem solved! More
>question: how can I
>> force vi to show these, or better yet, how can I get
>dos2unix or unix2dos
>> in Linux?
>
>perl -i -pe 's/\r\n/\n/' file_to_be_con