Skip to content

Instantly share code, notes, and snippets.

@dejanstojanovic
Created August 28, 2018 08:35
Show Gist options
  • Save dejanstojanovic/0e4035081fbc633810d0996ae02b702e to your computer and use it in GitHub Desktop.
Save dejanstojanovic/0e4035081fbc633810d0996ae02b702e to your computer and use it in GitHub Desktop.
Read text file line by line via bash
#!/bin/bash
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