sed 's/0x//' input | { IFS="=" ; while read a b
do
n=`echo "obase=10;ibase=16;$a"|bc`
echo "$n=$b"
done }
$ cat input
0x10=some text
0x20=some text
0x30=some text
$ cat mts
sed 's/0x//' input | { IFS="=" ; while read a b
do
n=`echo "obase=10;ibase=16;$a"|bc`
echo "$n=$b"
done }
$ ksh mts
16=some text
32=some text
48=some text
$
I don't think you can embed statements inside a regex like that. sed doesn't evaluate shell statements. And you don't need sed at all anyway, you already know the shell can translate...
How about:
while IFS="=" read HEX TEXT
do
echo "$((${HEX}))=${TEXT}"
done < input > output
$
$
$ cat f40
0x10=some text
0x20=some text
0x30=some text
$
$
$ perl -ne '/^(.*?)(=.*)$/ && printf("%s%s\n",hex($1),$2)' f40
16=some text
32=some text
48=some text
$
$