问题
我试着发射出一根六角线,就像:
echo hello | hexdump -ve '/1 "_%02X"' ; echo而是用%代替。
实际与预期
echo hello | hexdump -ve '/1 "%%%02X"' ; echo失败与
hexdump: bad conversion character %%问题
是否有任何方法以六转储格式字符串转义%?
发布于 2019-12-11 02:31:55
我不认为有任何方法可以让hexdump直接发出'%‘字符。也许您可以继续发出'_‘字符,然后通过sed传输结果,将'_’转换为'%‘。就像这样:
echo hello | hexdump -ve '/1 "_%02X"' | sed -e 's/_/%/g'它产生:
%68%65%6C%6C%6F%0Ahttps://stackoverflow.com/questions/59271734
复制相似问题