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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -