Skip to content

Instantly share code, notes, and snippets.

@suruseas
Created September 2, 2016 07:53
Show Gist options
  • Save suruseas/01b762f2b7a1ef3206b73e2cb3eef02b to your computer and use it in GitHub Desktop.
Save suruseas/01b762f2b7a1ef3206b73e2cb3eef02b to your computer and use it in GitHub Desktop.
読み込んだファイルを一行づつechoする
#!/bin/sh
OUTPUTFILE=$1
while read line || [[ -n $line ]]; do
echo $line
done < $OUTPUTFILE
exit 0
@suruseas
Copy link
Author

suruseas commented Sep 2, 2016

最終行に改行コードがない場合も対応

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment