Skip to content

Instantly share code, notes, and snippets.

@boardstretcher
Created January 24, 2017 15:23
Show Gist options
  • Save boardstretcher/91e24c43be79b2e3c5a210d7f03784b9 to your computer and use it in GitHub Desktop.
Save boardstretcher/91e24c43be79b2e3c5a210d7f03784b9 to your computer and use it in GitHub Desktop.
print lines 1 through 10 with cat
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