Skip to content

Instantly share code, notes, and snippets.

@jesusgoku
Created June 19, 2015 04:53
Show Gist options
  • Save jesusgoku/8186507102e3ca021df0 to your computer and use it in GitHub Desktop.
Save jesusgoku/8186507102e3ca021df0 to your computer and use it in GitHub Desktop.
Read file line by line from bash script
#!/usr/bin/env bash
while IFS='' read -r line || [[ -n $line ]]; do
echo "$file"
done < "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment