Search a string in a text and replace | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


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

Search a string in a text and replace

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-25-2013
suryanarayana suryanarayana is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 12 June 2014, 3:31 AM EDT
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Search a string in a text and replace

i am having text file below

System will display value URGENT and proceed
System will display value URGENT and proceed
System will display value URGENT and proceed
...............................................................
...............................................................

i want to search a string URGENT and delete from URGENT to end of the line
the output should be


System will display value
System will display value
System will display value
Sponsored Links
    #2  
Old 06-25-2013
anbu23's Avatar
anbu23 anbu23 is offline Forum Advisor  
Advisor
 
Join Date: Mar 2006
Last Activity: 18 December 2014, 8:26 AM EST
Location: Bangalore,India
Posts: 2,096
Thanks: 12
Thanked 132 Times in 127 Posts
What have you tried?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk + gsub to search multiple input values & replace with located string + extra text dazhoop Shell Programming and Scripting 2 01-24-2012 02:12 PM
awk - replace number of string length from search and replace for a serialized array otrotipo Shell Programming and Scripting 1 07-10-2009 01:04 PM
Search, replace string in file1 with string from (lookup table) file2? gstuart Shell Programming and Scripting 9 06-08-2009 07:11 AM
how can search a String in one text file and replace the whole line in another file kkraja UNIX for Dummies Questions & Answers 6 08-06-2008 08:23 AM
Perl: Search for string on line then search and replace text Crypto Shell Programming and Scripting 4 01-04-2008 10:24 AM



All times are GMT -4. The time now is 05:53 AM.