剛剛學習,做一點和shell腳本有關的筆記。
1、創建test.sh文件
touch test.sh
2、編輯sh文件
vi test.sh
3、
(1)保存退出
敲擊esc, 然后輸入 :wq ,回車退出
(2)不保存直接退出
敲擊esc,然后輸入:q!
4、添加可執行權限,當然默認就是可執行的。
chmod +x test.sh
5、運行文件
(1)./test.sh
(2)sh test.sh
6、刪除文件
rm test.sh
剛剛學習,做一點和shell腳本有關的筆記。
1、創建test.sh文件
touch test.sh
2、編輯sh文件
vi test.sh
3、
(1)保存退出
敲擊esc, 然后輸入 :wq ,回車退出
(2)不保存直接退出
敲擊esc,然后輸入:q!
4、添加可執行權限,當然默認就是可執行的。
chmod +x test.sh
5、運行文件
(1)./test.sh
(2)sh test.sh
6、刪除文件
rm test.sh
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。