Created
January 24, 2017 15:23
-
-
Save boardstretcher/91e24c43be79b2e3c5a210d7f03784b9 to your computer and use it in GitHub Desktop.
print lines 1 through 10 with cat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num=1 | |
while read line; do | |
if [[ ($num -ge 1) && ($n -le 10) ]]; then | |
echo $line | cat - | |
elif [[ $num -gt 10 ]]; then | |
break | |
fi | |
n=$(( $n + 1 )) | |
done < input |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment