特黄特色三级在线观看免费,看黄色片子免费,色综合久,欧美在线视频看看,高潮胡言乱语对白刺激国产,伊人网成人,中文字幕亚洲一碰就硬老熟妇

學習啦 > 學習電腦 > 操作系統(tǒng) > Linux教程 >

Linux操作系統(tǒng)Shell基礎知識

時間: 若木1 分享
1 cat /etc/shells
查看計算機上可用的shell
2 編寫shell,保存為firstscript
#! /bin/bash
# This is a test.
echo -n Your current directory is:
pwd
echo $HOME
echo Your current directory is:
pwd
#END.
3 運行firstscript
$ /bin/bash firstscript
如果找不到文件 使用pwd查看當前目錄
$ /bin/bash pwd/firstscript
可見當前運行結果。
4 可以修改firstscript為執(zhí)行
$chmod a+x firstscript
此時輸入$ ./firstscript即可
上面的shell沒有jiao換,我們可以進行jiao互,如下:
#!/bin/sh
echo -n Please input your ID:
read id_var
echo -n Please input your password:
read password
echo User ID = $id_var
echo password = $password
if [ $password = "admin" ]; then
echo "password is right"
else
echo "password is wrong"
fi
同前面的運行,自己測試。
23807