Re: displaying ASCII value of character

2004-03-21 Thread John W. Krahn
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 cor

Re: displaying ASCII value of character

2004-03-21 Thread Andrew Gaffney
Andrew Gaffney wrote: Andrew Gaffney wrote: I have a non-printable character that I'm trying to match in a regex, but I can't figure out what it is. If I know it comes after '~~~' in a string, how can I show its value? I tried: s/~~~(.?)/sprintf "|%d|", $1/se; but that just displays '|0|' whic

Re: displaying ASCII value of character

2004-03-21 Thread WC -Sx- Jones
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 contr

Re: displaying ASCII value of character

2004-03-20 Thread Andrew Gaffney
Andrew Gaffney wrote: I have a non-printable character that I'm trying to match in a regex, but I can't figure out what it is. If I know it comes after '~~~' in a string, how can I show its value? I tried: s/~~~(.?)/sprintf "|%d|", $1/se; but that just displays '|0|' which I don't think is righ