【发布时间】:2017-01-06 14:39:36
【问题描述】:
我有这个sn-p的代码
test.sh =>
#!/bin/bash
echo "i am running......."
while true
do
echo "you typed ----- $1"
done
我只想要像我在哪里输入test hello,它应该打印you typed ----- hello。
示例: 控制台 1
vagrant@dummy:~$ sh test.sh
i am running.......
控制台 2
vagrant@dummy:~$ test hello
you typed ----- hello
就像它应该像守护进程一样运行,我应该从任何地方调用它。有什么帮助吗?
【问题讨论】: