0

我正在尝试获取二进制文件的空白修剪纯十六进制转储

命令:

aes.key.hex=$(xxd -p /tmp/aes.key | tr -d '[:space:]')

失败:

bash: aes.key.hex=097b7be16b52de77437882889fc96a27132217867970b014016f5de3e6864b37: command not found

这里发生了什么?我能够 xxd -p /tmp/aes.key成功执行,所以罪魁祸首似乎是 bash 命令来修剪所有空格tr -d '[:space:]'

4

1 回答 1

1

The periods are the problem. Use underscores instead. Variable names must be of the form [a-zA-Z_][a-zA-Z0-9_]* (regex).

于 2020-03-13T01:00:56.813 回答