eval echo \$\'${string//\%/\\x}\'
echo \$\'${string//\%/\\x}\'
$'\x28\x26\x28'
(&(
string="%28%26%28"
%28%26%28 是3个16进制表示的ASC码 用%分开的 实际的字符是(&(
用sed 怎么转换呢
#!/bin/sh
hex2oct()
{
echo "obase=8; ibase=16; $1" | bc
}
printf \\`hex2oct $1`
阅读(1008) | 评论(0) | 转发(0) |