linux - cat/sed 一个 iOS 可执行文件 - 在 macOS 上出错

标签 linux bash shell unix sed

当我 catsed 一个 iOS 可执行文件时,它总是中断,并且我收到以下消息:

$ 1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c

当我按 Enter 时,我得到:

$ 1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c
-bash: 1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c1: command not found
-bash: 2c: command not found

最佳答案

终端不是用来处理二进制文件内容的。它们会导致各种不受欢迎的行为,可能是因为终端将某些内容解释为具有特殊含义的特定字符序列,这在正常内容中永远不会出现(除非专门为了控制目的而发送到终端)。

关于linux - cat/sed 一个 iOS 可执行文件 - 在 macOS 上出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41733442/

相关文章:

python - nohup : failed to run command

multithreading - WGET-同时连接速度很慢

Linux命令行递归删除其他文件夹中不存在的文件

bash - for 循环中的 shell 脚本 sum 不起作用

linux - 将位串转换为文本值代码的 Shell 脚本

linux - 在shell脚本中将逗号分隔的命令行参数转换为json

java - 如何在shell脚本中运行unstop jar

linux - 如何在 go 中正确实现挂载命名空间

linux - 在不指定字符数限制的情况下检查 shell 脚本中的数字是否为十六进制 [bash]

c - Bash 没有这样的文件或目录错误(缓存模拟器)