【bash】外部ファイルを読み込む
bashで外部ファイルを読み込む手順です。
外部ファイルを1行ずつ読み込んで表示する
テキストファイルを1行ずつ読み込んで表示します。
#!/bin/bash while read input do echo ${input} done < input.txt exit 0
input.txtの中身
テキスト 読み込み テスト
【実行結果】
テキスト 読み込み テスト
参考書
リンク
bashで外部ファイルを読み込む手順です。
テキストファイルを1行ずつ読み込んで表示します。
#!/bin/bash while read input do echo ${input} done < input.txt exit 0
input.txtの中身
テキスト 読み込み テスト
【実行結果】
テキスト 読み込み テスト
最近のコメント