bash - Parsing text file to variables -


$ cat file.txt example1@domain1-username 

i'd parse file.txt , export contents variables like:

var1=example1@domain1 var2=username 

var1=$(cut -d "-" -f 1 file.txt)  var2=$(cut -d "-" -f 2 file.txt) 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -