相关疑难解决方法(0)

bash,命令未找到

我在修复这个bash脚本中的错误时遇到了问题,我真的不知道我做错了什么,感谢任何帮助

[centoslive@livecd ~]$ sh ListFich.sh test
Synthese, Question 2
ListFich.sh: line 9: [-d: command not found
Il n'y a aucun repertoire qui se nomme test
ListFich.sh: line 15: [-f: command not found
Il n'y a aucun fichier qui se nomme test
[centoslive@livecd ~]$ 
Run Code Online (Sandbox Code Playgroud)
#!bin/bash

echo "Synthese, Question 2"

if test $# -eq 0; then
    echo "Argument Manquants"
    exit 1 
else 
    if [-d $1];then
        ls -d $1
        exit 1
    else 
        echo "Il n'y a aucun repertoire qui se nomme $1"
    fi …
Run Code Online (Sandbox Code Playgroud)

linux bash shell

5
推荐指数
1
解决办法
3893
查看次数

标签 统计

bash ×1

linux ×1

shell ×1