|
发表于 2010-9-14 21:57:31
|
显示全部楼层
Post by Jcan;2112104
这段代码可以正确执行:
#!/bin/sh
find . -exec ls \;
-------------------
#!/bin/sh
cmd='find . -exec ls \;'
$cmd
可是上面这段代码报错: find: missing argument to `-exec'
郁闷了好一阵子, 哪位帮fix一下, THKS~!
#!/bin/sh
cmd="find . \'-exec ls \;\'"
$cmd
或者
#!/bin/sh
cmd='find . \"-exec ls \;\"'
$cmd |
|