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
find and replace rakshit Shell Programming and Scripting 4 01-24-2008 12:52 AM
find and replace mahabunta UNIX for Dummies Questions & Answers 7 09-21-2006 09:05 AM
find and replace valhutch UNIX for Dummies Questions & Answers 4 07-29-2006 02:20 PM
find and replace vikas_j@hotmail UNIX for Dummies Questions & Answers 3 02-25-2002 02:41 PM
Find & Replace gagansharma Shell Programming and Scripting 3 11-27-2001 01:17 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 04-02-2008
Registered User
 

Join Date: Mar 2008
Posts: 14
find and replace

hi,
i have a data in a file like below:
100 8388kmn844., 8488
200 8398kmn894., 8398

i want replace from kmn to . as null.
output should be

100 8388, 8488
200 8398, 8398

Plz help.
Thanks in advance
Reply With Quote
Forum Sponsor
  #2  
Old 04-02-2008
Registered User
 

Join Date: Oct 2007
Posts: 74
Hi Javeed,

You can use sed to achieve your result.

Code:
sed 's/k.*\.//g' inp.txt
Regards,
Chella
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:18 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