- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2017-01-11T01:21:08+09:00","Group2","Group2")
#freeze
#author("2019-09-18T13:29:00+09:00","Group2","Group2")
[[hidekiwiki]]
#html{{
<meta name="description" content="http://fukumoto-tech.serveblog.net/wiki/" /> 
<meta name="description" content="https://fukumoto-tech.serveblog.net/wiki/" /> 
<meta name="keywords" content="普通人間製作所,world fukumoto-tech ,fukumototech,普通人間,Plesk,plesk,パスワード,メールアカウント,再発行,わからない,確認,方法,MySQL,ssh,全パスワード,サンプルスクリプト,サンプルスクリプト,対話式,対話,入力,yes
条件,シェルスクリプト,bash" /> 
<link rel="canonical" href="http://fukumoto-tech.serveblog.net/wiki/" />
<link rel="canonical" href="https://fukumoto-tech.serveblog.net/wiki/" />
<br>
<a href="http://it.blogmura.com/linux/"><img src="http://it.blogmura.com/linux/img/linux80_15_darkgray_1.gif" width="80" height="15" border="0" alt="にほんブログ村 IT技術ブログ Linuxへ" /></a><br /><a href="http://it.blogmura.com/linux/">にほんブログ村</a>
<a href="https://it.blogmura.com/linux/"><img src="https://it.blogmura.com/linux/img/linux80_15_darkgray_1.gif" width="80" height="15" border="0" alt="にほんブログ村 IT技術ブログ Linuxへ" /></a><br /><a href="https://it.blogmura.com/linux/">にほんブログ村</a>
<!-- admax -->
<script src="http://adm.shinobi.jp/s/1a0429ab1f292195e9a461469817a0ca"></script>
<script src="https://adm.shinobi.jp/s/1a0429ab1f292195e9a461469817a0ca"></script>
<!-- admax -->
</html>
}}
**対話型シェルスクリプト [#ce29c745]
サンプルスクリプトです。あくまで、自己責任で実行してください。
Yes/No を判定するシェルスクリプト
例の内容
Yesと入力した場合は、/root/anaconda-ks.cfgファイルの末尾5行を読み込む。
Noと入力した場合は、exitで抜ける。
-------------------------------------
#!/bin/sh
FileNAME=/root/anaconda-ks.cfg
echo "$FileNAME"
read FileNAME
echo "tail file ? [y/n]"
read ANSER
if [ $ANSER = 'y' -o $ANSER = 'yes' ]; then
tail /root/anaconda-ks.cfg
fi
if
[ $ANSER = 'n' -o $ANSER = 'no' ];then
echo "finsh!!";exit
fi