LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   replace local value variable with new value from script (https://www.linuxquestions.org/questions/linux-newbie-8/replace-local-value-variable-with-new-value-from-script-4175463004/)

Bharath_ 05-22-2013 09:07 AM

replace local value variable with new value from script
 
I have a file named program1 which has a variable mode and it's value is off.
mode off;

Now i want to write a shell script which will open the program1 file and set the mode to on. Can anyone help me how to do this?

Thank you in advance.

grail 05-22-2013 09:32 AM

Have a look at the sed command. Information on how to use can be found here

Bharath_ 05-22-2013 11:02 AM

Thank you for the quick response.


All times are GMT -5. The time now is 03:12 AM.