On Fri, 5 Jun 1998, Eric Wood wrote:

> I found my problem.  I had some carriage return characters (0D) mixed in
> with the line feed (0A).  I took them out and everything works (bash
> doesn't like those I guess).  I did a "bash -xv ./owmenu.try 2> junk"
I think that bash do just what we tell it; Since IFS does not normally
contain carriage return, bash treats it as a part of some word;
But then the error message is not very clear, since carriage return is not
visible;

> and seen some ^M characters in the junk file.
> 
> -Eric Wood
> 
If anyone find it useful, this is a script to print hex dump using 
hexdump command:
$ cat /usr/local/bin/hdump
hexdump -f /usr/local/bin/hexdump.fmt "$@"
$ cat /usr/local/bin/hexdump.fmt
"%07.7_Ax\n"
"%07.7_ax  " 8/1 "%02x " "-" 8/1 "%02x " " : "
8/1 "%01_p" "-" 8/1 "%01_p" "\n"


Then, for example
$cat /usr/local/bin/hexdump.fmt | hdump
0000000  22 25 30 37 2e 37 5f 41-78 5c 6e 22 0a 22 25 30 :"%07.7_A-x\n"."%0
0000010  37 2e 37 5f 61 78 20 20-22 20 38 2f 31 20 22 25 : 7.7_ax  -" 8/1"%
0000020  30 32 78 20 22 20 22 2d-22 20 38 2f 31 20 22 25 : 02x " "--" 8/1"%
0000030  30 32 78 20 22 20 22 20-3a 20 22 0a 38 2f 31 20 : 02x " " -:".8/1 
0000040  22 25 30 31 5f 70 22 20-22 2d 22 20 38 2f 31 20 : "%01_p" -"-"8/1 
0000050  22 25 30 31 5f 70 22 20-22 5c 6e 22 0a          : "%01_p" -"\n".   
000005d

It is very useful for me

Best regards,

Wojtek


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to