HI Again
I have made the script,In its initial stage,Need to ask one question i am taking backup of reslov.conf with this name reslov.conf~ but a problem is that when next time script run it will over write the backup file with new value.see my code you will get what i m saying ,Please ans this ASAP,its urgent.THX TO ALL
Code:
#!/bin/bash
sudo sed -i~ 's?^?#?' /home/syed/shellscript/resolv.conf
echo search.example.com >> resolv.conf
echo nameserver xxx.xxx.x.x >> resolv.conf
echo nameserver xxx.xxx.x.x >> resolv.conf
cat /home/syed/shellscript/resolv.conf