如果你正在使用zsh
你可以做这样的事情(注意c_bases
需要设置0x
在前面$num
):
setopt c_bases
typeset -i 16 num
for num in $( seq $((0xe000c000)) 4 $((0xe000d000)) ); do
echo "peek -lt $num > /luascript/dumpfileA"
done | head
输出:
peek -lt 0xE000C000 > /luascript/dumpfileA
peek -lt 0xE000C004 > /luascript/dumpfileA
peek -lt 0xE000C008 > /luascript/dumpfileA
peek -lt 0xE000C00C > /luascript/dumpfileA
peek -lt 0xE000C010 > /luascript/dumpfileA
peek -lt 0xE000C014 > /luascript/dumpfileA
peek -lt 0xE000C018 > /luascript/dumpfileA
peek -lt 0xE000C01C > /luascript/dumpfileA
peek -lt 0xE000C020 > /luascript/dumpfileA
peek -lt 0xE000C024 > /luascript/dumpfileA
删除head
,echo
并在您对输出感到满意时引用。