This being linux, there is always the do it yourself thing.
Here is a script I wrote a while back to dump files in hex, octal, and
ascii. I find it very useful. It uses od but makes the output human readable
(at least to this human). I forget how it works. I use linux with the newer
version of bash.
============================================================
#!/bin/bash
function odx1
{
set -o noglob
line=1
# for i in $(command od -xba $file | xargs -0 -s 129000 )
for i in $(command od -xba $file )
do
if [ ${#i} -gt 4  ];then
        echo
        echo
        line=1
        elif [ ${#i} -eq 4 ];then
                k=${i#??}
                l=${i%??}
                echo -n "$k  $l  "
        elif [ ${#i} -eq 3 ];then
                if [ $line -eq 1 ];then
                        line=2
                        echo
                fi
        echo -n "$i "
        else
        if [ $line -eq 2 ];then
                line=3
                echo
        fi
        case ${#i} in
          1) echo -n "$i   ";;
          2) echo -n "$i  ";;
          *) echo -n "BAD ";;
        esac
fi
done                                
}
file=$1
cat < /dev/null > junk.errors
odx1 $file 2> junk.errors
if [ -s junk.errors ];then
 echo An error has been detected
 cat junk.errors
 else
  echo No errors
fi
set +o noglob         
====================================
On Tue, Sep 18, 2001 at 02:42:39PM +0800, Chang wrote:
> I went to freshmeat.net and forgot to use locate. I forgot...
> 
> Joel Hammer wrote:
> 
> >There is also hexdump.
> >Joel
> >
> 
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> _______________________________________________
> http://linux.nf -- [EMAIL PROTECTED]
> Archives, Subscribe, Unsubscribe, Digest, Etc 
>->http://linux.nf/mailman/listinfo/linux-users
_______________________________________________
http://linux.nf -- [EMAIL PROTECTED]
Archives, Subscribe, Unsubscribe, Digest, Etc 
->http://linux.nf/mailman/listinfo/linux-users

Reply via email to