Skip to content

Instantly share code, notes, and snippets.

@ftclausen
Created October 10, 2013 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ftclausen/6915911 to your computer and use it in GitHub Desktop.
Save ftclausen/6915911 to your computer and use it in GitHub Desktop.
While loop avoiding useless use of cat
exec 6<somelist.txt
while read -u 6 -r item; do
echo "Doing something with $item
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment