Report comment

I am not seeing any difference between the last two commands; ie the output from both sed commands is the same on my terminal.Your first sed combined the two single quotes into one double quote, but I typed it as we previously discussed. I expected to see MySSid1,MySSid2,MySSid3, but instead I saw
ssid=MySSID1
ssid=MySSid2
ssid=MySSid3

What I was saying about the wpassid=$(awk '/ssid="/{ print $0 }' /etc/wpa_supplicant/wpa_supplicant.conf | awk -F'ssid=' '{ print $2 }' ORS=' ' | sed 's/\"/’’/g' | sed 's/ $//') is that the coloration in my script tells me that something is wrong. after the initial awk everything is yellow until you get to a green | feeding into the second sed which is blue. That tells me the program is not handling the line correctly. That is why I am looking for typos and syntax errors. I even tried copy and paste from your script and it still is not correct