rm fails to delete files by wildcard from a script, but works from a shell prompt

前端 未结 6 595
广开言路
广开言路 2021-01-30 19:51

I\'ve run into a really silly problem with a Linux shell script. I want to delete all files with the extension \".bz2\" in a directory. In the script I call

rm \         


        
6条回答
  •  隐瞒了意图╮
    2021-01-30 20:38

    I've seen similar errors when calling a shell script like ./shell_script.sh from another shell script. This can be fixed by invoking it as sh shell_script.sh

提交回复
热议问题