作者:mobiledu2502901317 | 来源:互联网 | 2023-06-07 15:28
12345678#!/usr/bin/env shurl=`xclip -o` # 什么都没有获取到if [[ ! "${url}" ]]; then exit 2fi`which chromi
1 2 3 4 5 6 7 8
| #!/usr/bin/env sh
url=`xclip -o` # 什么都没有获取到
if [[ ! "${url}" ]]; then
exit 2
fi
`which chromium` $weibo_url |
终端执行的话, xclip -o 是有内容输出的; 但执行脚本的话, 只会输出 stderr 2;
xclip 手册中对
的描述: print the selection to standard out( generally for piping to a file or pragram).