Skip to content

Instantly share code, notes, and snippets.

@vfrico
Created May 15, 2018 18:04
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 vfrico/357ad804ff24c62b7d21d788e31d05ba to your computer and use it in GitHub Desktop.
Save vfrico/357ad804ff24c62b7d21d788e31d05ba to your computer and use it in GitHub Desktop.
Read file line by line on bash
#!/bin/bash
# Usage: ./lines.sh lineas.txt
while IFS='' read -r line || [[ -n "$line" ]]; do
echo "$line"
done < "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment