歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Bash腳本記錄

Bash腳本記錄

日期:2017/3/1 14:50:07   编辑:關於Linux
Bash腳本記錄 記錄以下常用的shell命令。 1.Append output to files [sql] [androidyue@androidyue tmp]$ touch 1.txt [androidyue@androidyue tmp]$ echo "11111" > 1.txt [androidyue@androidyue tmp]$ echo "22222" >> 1.txt [androidyue@androidyue tmp]$ cat 1.txt 11111 22222 2.判斷字符串是否包含某字符串 [plain] item="a.png" if [[ "$item" == *.png ]] then echo $item fi
Copyright © Linux教程網 All Rights Reserved