我有一个运行带参数的程序的bash脚本.该程序输出一些状态(这样做,这样做......).这个程序没有选择安静.如何防止脚本显示任何内容?
我正在寻找类似windows"echo off"的东西.
我使用 gpg 只是为了加密和解密。
我使用的命令是:
for enc:
gpg --sign test
for dec:
gpg --decrypt test.gpg > test
Run Code Online (Sandbox Code Playgroud)
但我收到以下警告消息:
gpg: Signature made Fri Jun 24 17:29:00 2016 UTC using RSA key ID XXXX
gpg: Good signature from "XXXX@xxxx.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Run Code Online (Sandbox Code Playgroud)
当然,我已经尝试过
--status-fd, --no-comment, --no-mdc-warning,--no-tty ,--no-verbose --quiet --batch, --no-greeting etc基于互联网搜索。
有没有办法摆脱这些警告信息?
作为最后一个选项,我使用 如何在 bash 中隐藏命令输出
但我认为应该有一个简单的方法来抑制 gpg 中的警告。