Supote Leelasupphakorn wrote:
>    Is there option that enable standard vi (accompany wiht FreeBSD)
> for editing binary file in hex format ?

I do this fairly regularly, just use xxd.  For example try this:

cp /bin/cat ~/mycat
vi ~/mycat
<now editing in vi>
[esc] :%!xxd 
<now editing mycat in hex>
<find some innocuous string or rcsid>
<change the values on the hex side>
[esc] :%!xxd -r
[esc] :wq!
./mycat <somefile>

You can also 'pre' xxd transform the file, then edit it, then transform
it back when finished.

---
Mark
atkin901 at NOSPAM yahoo dot com
(!wired)?(coffee++):(wired);

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to