Skip to content

Instantly share code, notes, and snippets.

@johnjullies
Last active March 10, 2017 07:23
Show Gist options
  • Save johnjullies/ef4132dc559afb834a05804b987e9562 to your computer and use it in GitHub Desktop.
Save johnjullies/ef4132dc559afb834a05804b987e9562 to your computer and use it in GitHub Desktop.
Gets the contents of a file into an array variable and outputs the string one line at a time. Source: http://stackoverflow.com/a/11393884/1444895
IFS=$'\r\n' GLOBIGNORE='*'
command eval 'arr=($(cat ep_names))'
for i in "${arr[@]}"
do
echo "$i"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment