参考
-
Bash scripting
文字列の扱いが良く分かるのです。
ファイルの読み込みもできるのです。
FILE=hoge.txt
while read -r line; do
echo "$line"
done <"$FILE"
FILE=hoge.txt
cat "$FILE" | while read -r line; do
echo "$line"
done
-
BashPitfalls - Greg's Wiki
「Bashの落とし穴」たまに見るといいかも
More than 5 years have passed since last update.
FILE=hoge.txt
while read -r line; do
echo "$line"
done <"$FILE"
FILE=hoge.txt
cat "$FILE" | while read -r line; do
echo "$line"
done
Register as a new user and use Qiita more conveniently