繼看完沈超老師的達人1、2,linux網絡管理,現在開始學習shell。如果不知道shell課程的學習順序,點擊:http://www.xianlaiwan.cn/index/search?words=shell,看課程介紹,來安排學習順序。
2015-10-26
unset并不是因為在子shell中不能刪除環境變量,而是因為變量名前面加了$。
子shell刪除父shell定義的變量之后再exit退回父shell,被刪除的環境變量x還會存在。
再進入子shell變量x又出現了。
子shell刪除父shell定義的變量之后再exit退回父shell,被刪除的環境變量x還會存在。
再進入子shell變量x又出現了。
2015-10-25
#!/bin/bash
num1=$1
opt=$2
num2=$3
res=$((num1 opt num2))
echo $res
即可實現+ - / *計算器
num1=$1
opt=$2
num2=$3
res=$((num1 opt num2))
echo $res
即可實現+ - / *計算器
2015-10-22