Quantcast
Channel: tyoshikawa1106のブログ
Viewing all articles
Browse latest Browse all 1437

Shell:ファイルの読み込み

$
0
0

シェルスクリプトのファイル読み込みについて確認しました。

f:id:tyoshikawa1106:20151111210652p:plain


次のようにループ処理を使って読み込みできます。

file_path="$FAILE_PATH"
echo $file_path

i=0
while read line
do
  if [ $i -ne 0 ]
  then
    echo $line
  fi
  i=`expr $i + 1`
done < $file_path


サンプルコードです。


Viewing all articles
Browse latest Browse all 1437

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>