【发布时间】:2015-02-11 15:01:09
【问题描述】:
有什么方法可以让我拥有一个 bash 文件并像这样在第二行传递一个参数
sh -c
git status;
echo "hello world"
真的很丑
sh -c "git status; echo "hello world""
我将 sh 传递给另一个命令,所以我不能这样做:
git status;
echo "hello world"
即使是做这样的事情也不错
echo
"hello world"
基本上我需要一种不终止新行的方法
在这里寻找一种更漂亮的方式将命令传递给xargs
https://stackoverflow.com/a/6958957/340688
【问题讨论】: