Loading variables from a text file into bash script.

Posted by S1syphus on Stack Overflow See other posts from Stack Overflow or by S1syphus
Published on 2010-04-16T12:08:35Z Indexed on 2010/04/18 19:33 UTC
Read the original article Hit count: 237

Filed under:

Is it possible to load new lines from a text file to variables in bash?

Text file looks like?

EXAMPLEfoo 
EXAMPLEbar
EXAMPLE1
EXAMPLE2
EXAMPLE3
EXAMPLE4

Variables become

$1 = EXAMPLEfoo 
$2 = EXAMPLEbar 

ans so on?

© Stack Overflow or respective owner

Related posts about bash