Linux Shell執行source或.命令報錯'bash: ..: command not found'
Linux Shell執行source命令報錯
[root@localhost fire]# vi config.ini
VERSION_LEVEL_TABLE = 'version'
SQL_SCRIPT_NAME = 'e'
[root@localhost fire]# . config.ini
bash: VERSION_LEVEL_TABLE: command not found
bash: SQL_SCRIPT_NAME: command not found
[root@localhost fire]# source config.ini
bash: VERSION_LEVEL_TABLE: command not found
bash: SQL_SCRIPT_NAME: command not found
報錯原因:宣告的變數和等號之間有空格
[root@localhost fire]# vi config.ini
VERSION_LEVEL_TABLE='version'
SQL_SCRIPT_NAME='e'
[root@localhost fire]# . config.ini
[root@localhost fire]# echo $VERSION_LEVEL_TABLE $SQL_SCRIPT_NAME
version e
[root@localhost fire]# vi config.ini
VERSION_LEVEL_TABLE = 'version'
SQL_SCRIPT_NAME = 'e'
[root@localhost fire]# . config.ini
bash: VERSION_LEVEL_TABLE: command not found
bash: SQL_SCRIPT_NAME: command not found
[root@localhost fire]# source config.ini
bash: VERSION_LEVEL_TABLE: command not found
bash: SQL_SCRIPT_NAME: command not found
報錯原因:宣告的變數和等號之間有空格
[root@localhost fire]# vi config.ini
VERSION_LEVEL_TABLE='version'
SQL_SCRIPT_NAME='e'
[root@localhost fire]# . config.ini
[root@localhost fire]# echo $VERSION_LEVEL_TABLE $SQL_SCRIPT_NAME
version e
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2124664/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【linux報錯】-bash: xhost: command not foundLinux
- shell指令碼執行錯誤 $‘\r‘:command not found指令碼
- python virtualenv報錯-bash: virtualenv: command not foundPython
- Linux:-bash: tree: command not foundLinux
- Linux:-bash: unzip: command not foundLinux
- Mac之telnet報錯-bash: telnet: command not foundMac
- 執行shell指令碼報錯:-bash: ./test1.sh: /bin/bash^M: ...指令碼
- SUSE Linux執行基本命令出現command-not-foundLinux
- 使用NetCat或BASH建立反向Shell來執行遠端執行Root命令
- Mac -bash: mysql: command not foundMacMySql
- -bash :gradlew command not foundGradle
- bash: hadoop: command not foundHadoop
- AIX下執行shell報錯^M: not found 或 vi 檔案發現存在很多^M字元AI字元
- CentOS 已安裝virtualenv, 但還是報錯誤 bash: virtualenv: command not foundCentOS
- centos 7 -bash: mysql: command not foundCentOSMySql
- 詳解shell中source、sh、bash、./執行指令碼的區別指令碼
- ubuntu18 沒有 where 命令 -bash: where: command not foundUbuntu
- python裡執行shell命令或cmd命令Python
- 解決shell指令碼錯誤$’r’ command not found指令碼
- crontab異常:shell下可以執行命令,執行crontab卻報錯
- 修改 Linux 預設 Shell 用 chsh -s /bin/zsh 命令不生效,提示 chsh: Shell not changed. 或 chsh: command not found 怎麼辦Linux
- linux自定義shell(bash)命令Linux
- bash: lspci: command not found解決方法
- bash: ssh-copy-id: command not found...
- laravel:從linux命令列執行commandLaravelLinux命令列
- ./mongod命令執行報錯Go
- 執行srvctl命令報錯
- Linux下執行一些命令前加sudo時出現command not found的原因Linux
- 執行npm run dev 後報錯 Mix: not foundNPMdev
- AS執行main()方法報錯:SourceSet with name ‘main‘ not foundAI
- Centos7 Minni 安裝 執行ifconfig命令出現 -bash ifconfig command not found 的解決方法CentOS
- 解決bash: mysql: command not found的問題MySql
- sh/bash/source/.命令的區別
- -bash: XXX: command not found解決辦法
- Linux Source命令及指令碼的執行方式解析Linux指令碼
- fish:Linux中比bash或zsh更好用的ShellLinux
- Linux Bash Shell學習(七):shell程式設計基礎——執行Shell指令碼、functionLinux程式設計指令碼Function
- bash shell指令碼執行方法總結指令碼