Wc -Sx- Jones wrote:
> 
> Dos files lines end with control-M control-J, while unix files end with
> control-J.  If you look at a dos ascii file in unix you will see the
> control-M.  Control-M is the carriage return and control-J is the line
> feed.  In order to display a dos ascii file in unix correctly you must
> remove the control_M. There are a number of ways to do this.  One
> convenient method is to make a small shell script with the contents,
> #/bin/sh
> cat $1 tr -d '\015' >$2

It will probably work better if you pipe the output of cat to tr:

cat $1 | tr -d '\015' >$2

Or avoid the useless use of cat:

tr -d '\015' <$1 >$2

And you may find that $1 and $2 will need to be quoted to work properly:

tr -d '\015' <"$1" >"$2"



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to