linux - concatenateing string variables overwrites them -


i have problem concatenate 2 string variables. second variable overwrites first one.

script:

subject1=$(grep -e -o "exit.{0,12}" 123.log) subject2=$(grep transferred: 123.log) completesubject="$subject1 / $subject2" echo $completesubject 

subject1 contains exit status 0, while subject2 contains transferred: sent 308464915408, received 11704 bytes, in 14844.1.

now completesubject results in / transferred: sent 308464915408, received 11704 bytes, in 14844.1 seconds, want exit status 0 / transferred: sent 308464915408, received 11704 bytes, in 14844.1 seconds.

what problem?


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

excel vba - VBA Proxy auto-configuration for http requests -

sql server 2008 - split ssrs expression between 2 words -