shell下action:command not found
今天測試同事寫的一個shell腳本,執行的時候報錯,錯誤代碼為"action: command not found"
檢查腳本發現“. /etc/init.d/functions”居然被註銷了, 取消註釋後,繼續執行腳本:
報錯消失,問題得到解決。說明:一些基礎的函數腳本是放在函數文件裏面,比如放在/etc/init.d/functions裏,與執行的內容分相分離,看起來會更清爽,大型的程序語言都是這樣開發的
本文出自 “冰凍vs西瓜” 博客,請務必保留此出處http://molewan.blog.51cto.com/287340/1932437
shell下action:command not found
相關推薦
shell下action:command not found
command 程序語言 action 開發 今天測試同事寫的一個shell腳本,執行的時候報錯,錯誤代碼為"action: command not found"檢查腳本發現“. /etc/init.d/functions”居然被註銷了, 取消註釋後,繼續執行腳本:報錯消失,問題得到解決。說明
linux下執行常用命令出現:command not found
在 linux 下執行類似與 ls、ll、vim 等命令時出現 command not found,並且執行 source /etc/profile 出現 bash: id: command n
sudo: npm:command not found 問題解決辦法
body and bin install chmod pre usr ash -s 在輸入sudo npm install ... 出現sudo: npm:command not found的報錯提示的解決辦法: 建立軟鏈 sudo chmod -R 755 opt/no
CentOS下ifconfig出現“command not found”
CentOS ifconfig ifconfig命令提示“command not found”,推測是安裝的時候選擇了最小安裝造成的。 查看/sbin目錄下是否存在ifconfig:ls /sbin發現不存在ifconfig 修改網卡配置:vi /etc/sysconfig/network-scri
源碼安裝並且成功啟動mysql後輸入mysql報錯:command not found
mysql源碼安裝並且成功啟動mysql後輸入mysql報錯:-bash: mysql: command not found解決方案:方案1、需要做軟連接:ln -s /usr/local/mysql/bin/* /usr/bin/ 方案2、加入環境變量:vim /etc/profile.d/mysql.s
Centos中使用Jenkins執行gulp命令:command not found
file 信息 div 使用 ace 發布流程 lin rabl min 在Centos操作系統,使用Jenkins的pipeline執行發布流程:jenkinsfile如下: stage("前端項目構架gulp") { steps {
Linux執行source /etc/profile報錯“:command not found”
命令 csdn brush linux not etc highlight 可用 class 修改完 /etc/profile中的內容後,執行“立即生效”命令 “source /etc/profile”報錯: :command not found :command not
MAC下產生sudo:command not found
是因為環境變數設定錯誤 1.在命令列中輸入: export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin 可以實現暫時的使用。 2.輸入cd ~/ #進入當前使用者的home目錄 3.建立bash_profile 執行命令: t
CentOS7下解決ifconfig command not found的辦法(轉)
解決辦法如下: 1、輸入ip addr 確認IP地址是否設定正常,設定好如下所示,如果沒有獲取到IP地址則設定一個即可。 2、確認sbin目錄是否存在。 cd /sbin 1 3、確認ifconfig命令是否未安裝 在sbin目錄下輸入ls,
Mac下node提示command not found
第一步:建立.bash_profile檔案,~表示在~目錄下,.表示隱藏檔案,開啟終端,輸入命令如下 [objc] view plain copy touch ~/.bash_profile 第二步:開啟.bash_prof
django-admin:command not found;django無法建立工程問題
系統:macOS 10.13.4 python版本:2.7(Mac自帶) 用pip安裝了django,且能夠import成功,可是建立工程時,卻顯示django-admin: command not found。 又是幾個小時的debug,嚶嚶嚶。 Anyw
Linux Centos安裝jdk 之前照著網上安裝了好多次 結果都是javac編譯失敗,出現javac :command not found
根據師父的描述是我少安裝了java jdk的依賴包。 解決方法如下: 先解除安裝open-jdk yum -y remove java-1.8.0-openjdk* //解除安裝所有openjdk檔案 yum -y remove tzdata-java.noarc
centos中配置環境變數,source /etc/profile後,測試java -version 顯示 -bash:java:command not found
cho $PATH 中顯示配置的環境變數已經存在,但測試java -version仍顯示-bash:java:command not found。這是在profile中新增的,其中jdk是java的一個符號連結。 測試java -version echo $PATH &nb
Linux下提示 git: command not found
1.出錯原因: 伺服器沒有安裝GIT,所以導致出錯。 解決辦法: 1)Centos下使用:yum install git -y 或者 yum install -y git . (c
centOS locate : command not found 問題解決
跟隨鳥哥的Linux私房菜進行學習的過程中,用locate 查詢檔案 提示 -bash: locate: command not found 那就先updatedb一下吧 提示 -bash: updatedb: command not found baidu說upd
java和javac環境變數配置 : javac:command not found
➢ java有版本提示,javac無法檢測到 bash:javac:command not found 出現這種情況可能是安裝目錄或者環境變數配置有問題 是多了一個分號或者少了一個點的問題 ➢ 找到jar的目錄 預設安裝在java目錄的子目錄jar資料夾下 ➢
make: ./libtool:command not found
#cd jpeg-6b#cp /usr/share/libtool/config/config.sub .#cp /usr/share/libtool/config/config.guess .把 libtool裡面的兩個配置檔案拿來覆蓋掉jpeg-6b目錄下的對應檔案make clean 再重新config
linux下提示:command not find解決方法
在linux下我們經常輸入某些命令時經常出現提示說:command notfind。對此網上已經有很多人對此作了闡述,但是對於菜鳥來說可能仍然不理解,下面我我對這個做一下詳細說明。 首先 當出現 command notfind時肯定是環境變數的問題,所以得修改環境變數。下
解決make:arm-linux-gcc :command not found(有效)
錯誤提示: arm-linux-gcc: Command not found 原因: 1)沒有在~/.bashrc 或者/etc/environment中新增交叉編譯工具鏈bin檔案路徑 解決方法: ①使用sudo tar xjvf xxxxxxxxx.tar.bz
linux下提示bash:command not found
點評:新安裝的linux系統,如果進行精簡安裝可能會出現bash:command not found 的提示,大家在安裝的時候可以選擇預設安裝basic的元件,一般即可。到時候可以再升級。 如果新裝的系統,執行一些很正常的諸如:shutdown,fdisk的命令時,悍然