Created
October 29, 2013 23:39
-
-
Save adam000/7224692 to your computer and use it in GitHub Desktop.
How to turn a file into an array in bash (delimited by newline, if I remember correctly).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Please enter a file to be read as an array:" | |
read fileName | |
a=( $(cat fileName) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment