The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Change 'which' file is used JJ07 UNIX for Dummies Questions & Answers 1 01-05-2008 09:42 AM
How to change the file name rp1982 UNIX for Dummies Questions & Answers 2 11-29-2007 09:49 PM
Change format to file II DebianJ UNIX for Advanced & Expert Users 0 03-07-2006 11:25 AM
How to change this file with SED? bejgirl Shell Programming and Scripting 4 01-03-2006 06: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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #15  
Old 03-07-2006
Registered User
 

Join Date: Dec 2005
Location: India
Posts: 218
One more way of doing it man, using gsub in awk

Quote:
awk '{gsub("INI_TEST YES","INI_TEST NO"); print}' f2.txt
where f2.txt is your input file
Gaurav

Last edited by gauravgoel; 03-07-2006 at 02:35 AM.
Reply With Quote
Forum Sponsor
  #16  
Old 03-07-2006
Registered User
 

Join Date: Jul 2005
Posts: 137
Quote:
Originally Posted by gauravgoel
awk '{gsub("INI_TEST YES","INI_TEST NO"); print}' f2.txt
Code:
awk '{sub("INI_TEST YES","INI_TEST NO"); print}' f2.txt
Code:
ruby -i -pe 'sub(/(INI_TEST )YES/,"\\1NO")' file.ini
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0