shell - 什么是 .shar 文件?

标签 shell unix makefile archive

关闭。这个问题是off-topic .它目前不接受答案。












想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。

9年前关闭。




Improve this question




阅读 make 的手册页:

`shar' Create a shell archive (shar file) of the source files.



什么是沙尔?

最佳答案

它是一个 shell 归档文件,一个自解压的可执行 shell 脚本,它是一种传送文件归档文件的便捷方式,并且只需运行脚本即可让它们出现。

下面的脚本中显示了一个示例,该示例仅提供了存档中的一个文件,output.txt :

pax> cat shar.bash 
#!/bin/bash
tr '[A-Za-z]' '[N-ZA-Mn-za-m]' >output.txt <<EOF
    Uryyb sebz Cnk.
EOF

pax> ./shar.bash 
pax> cat output.txt 
    Hello from Pax.

这是一个相当简单的方法,因为它只提供一个文件,并且根本不压缩它,但它应该给你一个大致的概念。

一个真正的可能会给你一些类似于 tar、gzip 和 uuencode 组合的文件,然后通过 uudecode、gunzip 和 tar 传递原始内容。

关于shell - 什么是 .shar 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13357829/

相关文章:

c - GNU、autotools 的 makefile - 构建 C 语言源代码的规则和方法

linux - 退出的意义

bash - 如何根据 svn 评论中的字符串获取颠覆 URL(主干/分支)中的所有修订?

linux - 如何在 Shell 中重现 "Too Many open files"错误

cocoa - 将 CFPropertyList 保存到用户文件夹

c++ - 无法使用 makefile 编译

c - 如何修改 makefile 以将更改的源编译到除文件列表之外的对象目录中

linux - 通过shell脚本计算文件中的字符数

windows - Windows 中的父子关系

linux - 如何使用 awk shell 脚本(如下所示?)对时间 A(格式为 "hh:mm:ss")和时间 B 之间的行进行排序?