I'm runnining Raspbian, but this is not a Pi specific question
I need to delete from within my C program an unused network profile from etc/wpa_supplicant/wpa_supplicant.conf.
My program runs as root.
Is there a shell command for this ?
I tried using combinations of grep, tr, and sed, but I'm not getting quite there. Also the white-spaces may vary.
I need to remove this block for a given ssid, disregarding white-spaces.
network={
ssid="MY_SSID_TO_DELETE"
.........
}
Try this
in a C that can generate your SSID info directly in command (replace Put_your_ssid_here with the value of the ssid)
1st snippet with \n in place of ;
Principle (based on last snippet)