Am Samstag 22 September 2007 09:19:02 schrieb ronggui:
> for example:
> ASCII: a test
> HEX : 61 20 74 65 73 74

A small Python script to do the same (in case you need more control, adapt it 
as it suits you).

---
#!/usr/bin/python

from sys import argv

for c in " ".join(argv[1:]).decode("ascii"):
    print hex(ord(c))[2:].upper(),
---

[EMAIL PROTECTED] ~]$ python test.py this is a test
74 68 69 73 20 69 73 20 61 20 74 65 73 74
[EMAIL PROTECTED] ~]$

-- 
Heiko Wundram
Product & Application Development
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to