![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change 'which' file is used | JJ07 | UNIX for Dummies Questions & Answers | 1 | 01-05-2008 08:42 AM |
| How to change the file name | rp1982 | UNIX for Dummies Questions & Answers | 2 | 11-29-2007 08:49 PM |
| Change format to file II | DebianJ | UNIX for Advanced & Expert Users | 0 | 03-07-2006 10:25 AM |
| How to change this file with SED? | bejgirl | Shell Programming and Scripting | 4 | 01-03-2006 05:23 AM |
| Help with multiple file rename - change case of part of file name | steve7 | UNIX for Dummies Questions & Answers | 7 | 06-30-2005 10:41 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Help to change value from a file.
How can I change the value of "INI_TEST" from "YES" to "NO" in the setup.ini file by command?
[galaxy@test01 test]$ cat setup.ini INI_START YES INI_END YES INI_TEST YES Thank u in advance! |
| Forum Sponsor | ||
|
|
|
|||
|
Code:
sed 's/INI_TEST YES/INI_TEST NO/g' text > text #substitute INI_TEST YES with INI_TEST NO and overwrite the original file |
|
||||
|
Quote:
Like I mentioned before, if you have a -i option for your sed, use that for operations like read and write on a single file. |
|
||||
|
Quote:
I think it should be as simple as opening the file in your favourite editor and changing the value. |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|