这是我的ls
命令,它显示当前目录中的文件列表:
rper: ls -l
$commandoutput[0]
file.txt
我尝试$commandoutput[0]
通过使用删除行rm -rf $commandoutput[0]
,但显示以下错误。我该如何删除?
rper: rm -rd $commandoutput[0]
commandoutput: Undefined variable.
使用反斜杠转义$
(最好[
是]
)登录文件名\
:
rm -rf \$commandoutput\[0\]
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句