全文検索:
- 01 Bash - 制御文
- ====== 01 Bash - 制御文 ====== ===== if文 ===== if文は、ある条件を指定して、それが真(0)が偽(1)かで処理を分岐する制御文です。\\ <color red>※... i </code> ==== if文 使用例 ==== testコマンドによる、if分岐 test01.sh <code> #!/bin/sh if test $1 -le 0 then echo... than 0." fi </code> 実行例 <code console> $ sh test01.sh 6 Number is Less than or equal 0. $ sh test01.sh 8 Number is grater than 0. </code> ===== 条件 =====
- 02 パラメータ変数
- | | $- |現在のオプションフラグ| --- //[[matsui@flateight.com|Shinya Matsui]] 2012/08/01 11:53// {{tag>bash}}
- 10 Bashでゼロパディング
- ashでゼロパディングする方法。 シンプルだけど、結構便利 <code> $ seq -w 10 01 02 03 04 05 06 07 08 09 10 </code> zero padding
- 01 ファイルの指定行を抜き出す @bash:script
- ====== 01 ファイルの指定行を抜き出す====== ===== 指定行を表示 ===== これで、hogehoge.confの100行目を表示 <code console> $ sed -n
- 06 応答で処理を分岐する @bash:script
- sac done </code> ・実行結果 <code console> $ sh sample01.sh 1) ls -sF 2) pwd 3) w 4) clear q|Q) exit 2 /
- 16 awkでチェック @bash:script
- ifcegd --> Active Subset name : isw_difcegd_raid01 size : 927985664 stride : 128 type : mirror s