相关疑难解决方法(0)

在从 curl 管道传输到 sh 之前阅读并确认 shell 脚本(curl -s [url] | sh)

每当我必须从 web 执行 shell 脚本时curl -s [url] | sh,我首先url在我的 web 浏览器中打开以确保脚本不是恶意的并且可以安全运行。

我记得看到一个命令行技巧,可以从命令行读取脚本,然后在读取脚本后确认执行。如果我没记错的话,它看起来像curl -s [url] | something...here | sh并且不需要安装任何软件。

有人知道这个技巧吗?

command-line security bash curl

11
推荐指数
1
解决办法
3943
查看次数

从编辑器(vim/nano/emacs/textmate?)获取输入

我只是好奇,如果有办法从中获取输入不StdIn但是从$EDITOR-无论是Vim的纳米,emacs的,甚至非命令行编辑器(的MacVim / TextMate的)。有哪些选项/解决方法/最佳实践?

基本上我希望像这样的工作流程heredoc- 但是来自 $editor 。

$ sort -nr << FOO | uniq -c 
pipe heredoc> foo 
pipe heredoc> bar
pipe heredoc> baz
pipe heredoc> foo
pipe heredoc> FOO
   2 foo
   1 baz
   1 bar
Run Code Online (Sandbox Code Playgroud)

shell zsh input

4
推荐指数
1
解决办法
948
查看次数

标签 统计

bash ×1

command-line ×1

curl ×1

input ×1

security ×1

shell ×1

zsh ×1