LoginSignup
37
32

ShellScript 【 while read 】 ファイルを1行ずつ読み込む

Last updated at Posted at 2020-02-25

2024/02/29 追記

内容を更新して自社のテックブログに転記しました。
https://eight-hundred-800-dev.hatenablog.com/entry/2024/02/29/180000

書式

while read 【変数名】
do
  【実行されるコマンド等】
done < 【ファイル名】

# while ~ do を1行に書く場合は do の前に ; が必要
while read 【変数名】; do
  【実行されるコマンド等】
done < 【ファイル名】
37
32
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
37
32