Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Search a string in a text and replace

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 06-25-2013
anbu23's Unix or Linux Image
anbu23 anbu23 is offline Forum Advisor  
Advisor
 
Join Date: Mar 2006
Last Activity: 16 March 2015, 4:56 AM EDT
Location: Bangalore,India
Posts: 2,136
Thanks: 14
Thanked 150 Times in 143 Posts
What have you tried?
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 01: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 12:04 PM
Search, replace string in file1 with string from (lookup table) file2? gstuart Shell Programming and Scripting 9 06-08-2009 06: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 07:23 AM
Perl: Search for string on line then search and replace text Crypto Shell Programming and Scripting 4 01-04-2008 09:24 AM



All times are GMT -4. The time now is 01:12 PM.