gpt4 book ai didi

linux - 我可以在 Linux 中混合文本和二进制文件吗?

转载 作者:IT王子 更新时间:2023-10-29 01:24:55 24 4
gpt4 key购买 nike

我想简化该应用程序在 Linux 系统上的安装,使其成为一键式安装。为此,我希望将 bash 脚本与压缩的 tar 相结合。

所以我有 install.shsome_app.tar.gz 文件。

然后我有一个执行此操作的 Ant 任务:

cat install.sh some_app.tar.gz > some_app.exe

简而言之,文件读取自身、解压缩 tarball 并提取文件并更改权限。

当我单独运行 install.sh 时它工作正常,但是一旦我运行 some_app.exe 它就会失败并出现以下错误:

/some_app.exe: line 4: Binary file (standard input) matches + 1: arithmetic syntax error

所以我想知道文本是否可以与二进制结合?

最佳答案

关于linux - 我可以在 Linux 中混合文本和二进制文件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6232274/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com