Art*_*nin 4 bash shell openssl
有什么方法可以禁用控制台消息“写入RSA密钥”吗?
$ openssl rsa -pubout -outform DER -inform PEM -in /tmp/res/chrome.pem -out 1 > /dev/null
writing RSA key
$ openssl rsa -pubout -outform DER -inform PEM -in /tmp/res/chrome.pem -out 1
writing RSA key
$ openssl rsa -pubout -outform DER -inform PEM -in /tmp/res/chrome.pem > /dev/null
writing RSA key
Run Code Online (Sandbox Code Playgroud)
我尝试了这些命令,结果相同:(
运行命令with将strace显示消息已写入STDERR:
write(2, "writing RSA key\n", 16) = 16
^Run Code Online (Sandbox Code Playgroud)
因此您必须重定向,STDERR而不是STDOUT:
openssl rsa -pubout ... 2>/dev/null
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1365 次 |
| 最近记录: |