【发布时间】:2021-05-22 18:57:15
【问题描述】:
如何在不使用 Bash 的情况下使用一行 Shell 命令比较两个远程文件之间的文件内容差异?
尝试运行文件attempt.sh,其内容为:
#! /bin/sh
diff $(curl "https://raw.githubusercontent.com/dockerfile/ubuntu/master/README.md") $(curl "https://raw.githubusercontent.com/dockerfile/ubuntu/master/Dockerfile")
请注意,如 here 所示,来自 bash 的 <() 进程替换在 shell 中不可用。
【问题讨论】: