所以我从命令行调用这个PHP脚本:
/usr/bin/php /var/www/bims/index.php "projects/output"
Run Code Online (Sandbox Code Playgroud)
它的输出是:
file1 file2 file3
Run Code Online (Sandbox Code Playgroud)
我想要做的是获取此输出并提供给"rm"命令但我认为我做得不对:
/usr/bin/php /var/www/bims/index.php "projects/output" | rm
Run Code Online (Sandbox Code Playgroud)
我的目标是删除PHP脚本输出的任何文件名.应该怎样做才能做到这一点?
谢谢!
Vic*_*kin 11
/usr/bin/php /var/www/bims/index.php "projects/output" | xargs rm
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8136 次 |
| 最近记录: |