My brother's e-mail is not working so he can't respond himself (He is currently electronically crippled! Oh the humanity!! :o ). His e-mail not working is not related to this problem, it's a server problem (and unfortunately neither of us have root access in order to fix it).

He said:

"Actually, Carl's script works on the relevant field, but it has a side affect that corrupts other data. Specifically, a string of the form of "_n", where n is a hex number [0-1,a-f]. IOW, it doesn't limit the changes to the X-Mozilla-Status field."

PGA

Carl Lowenstein wrote:

oops   Just found out that GNU sed version 4.1.2 doesn't understand :xdigit:.
Medium-clumsy sed script:
- - - - - - - -
/\(^X-Mozilla-Status: [0-9a-f][0-9a-f][0-9a-f]\)\([89a-f]\)/s//\1_\2/
# split off last digit
s/_8/0/                           # clear the "8" bit, remove the _
splitting character
s/_9/1/
s/_a/2/
s/_b/3/
s/_c/4/
s/_d/5/
s/_e/6/
s/_f/7/
/^/p                              # print all lines
- - - - - - - -
My test file "text"
[EMAIL PROTECTED] dallen]$ cat text
X-Mozilla-Status: 001d
X-Mozilla-Status: 0019
X-Mozilla-Status: 0007
X-Mozilla-Status: 0009
X-Mozilla-Status: 1234
X-Mozilla-Status: 5678
X-Mozilla-Status: 9abc
X-Mozilla-Status: def0


[EMAIL PROTECTED] dallen]$ sed -n -f sedscr text
X-Mozilla-Status: 0015
X-Mozilla-Status: 0011
X-Mozilla-Status: 0007
X-Mozilla-Status: 0001
X-Mozilla-Status: 1234
X-Mozilla-Status: 5670
X-Mozilla-Status: 9ab4
X-Mozilla-Status: def0

More than you wanted to know.  But if you don't want to do arithmetic,
then it takes 8 substitution statements to cover all the possibilities
89abcdef -> 01234567.



--
Paul G. Allen, BSIT/SE
Owner, Sr. Engineer
Random Logic Consulting Services
www.randomlogic.com


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to