~$ cat ~/forked_sh.sh
#/bin/sh
echo THis_is_return
sleep 2;
~$ socket=wlan0
~$ echo $socket
wlan0
~$ mystring_$socket=.`/forked_sh.sh`
mystring_wlan0=THis_is_return: command not found
I was expecting that it will assign, but the bash running as whole as 1 string in place of $ a=sfkjsdf
mystring_$socket='./forked_sh.sh'
(with backticks). Or better:mystring_$socket=$(./forked_sh.sh)
– Stephen Rauch Apr 01 '17 at 21:55