Hello 35ishaan,
If I understand correctly what you want to do, is you want to at some point change the Edison's configuration so it only connects to an specific network, and you want to do it through a script, am I right?
If so, you could make a script in python, nodejs or any other compiler that modifies your wpa_supplicant.conf file and change the SSID and password to whatever you want.
If I didn't understand you correctly and all you want to do is connect your Edison to a wireless network, all you need to do is type configure_edison --wifi and follow the instructions.
Regards,
Peter