「shell入門」ファイルの中身を読み込むサンプル

1.サンプル
readfile.sh
#!/bin/bash
CFT=`cat ファイル名`
while read line
do
echo $line
done << FILE
$CFT
FILE

2.実行コマンド
$ sh readfile.sh

shellscript

Posted by arkgame