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
Removing special characters in file srivsn Shell Programming and Scripting 6 01-03-2008 02:10 AM
Help with removing characters like ^M chiru_h Shell Programming and Scripting 16 02-13-2007 06:07 AM
Identifying and removing control characters in a file. oracle8 High Level Programming 0 04-13-2004 03:08 PM
Removing carriage return characters from file b1saini UNIX for Dummies Questions & Answers 3 09-10-2003 06:41 AM
removing characters from end of string el_toro Shell Programming and Scripting 4 07-14-2002 05:02 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-25-2008
Registered User
 

Join Date: Apr 2008
Posts: 11
Stumble this Post!
Removing certain characters in a file

Hi

I have a file that has semicolons in it ( is there a way to just remove these in the file. Example

name: Joe Smith; group: Group1;
name: Mary White; group: Group2;
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-25-2008
in2nix4life's Avatar
Registered User
 

Join Date: Oct 2007
Location: East Coast
Posts: 44
Stumble this Post!
You can use 'sed' to remove all the ';' from the file:

sed -i.bkup -e 's/;//g' file.txt

Hope this helps.
Reply With Quote
  #3 (permalink)  
Old 04-25-2008
Registered User
 

Join Date: Apr 2008
Posts: 11
Stumble this Post!
Thanks I forgot all about sed!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:25 AM.


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

Content Relevant URLs by vBSEO 3.2.0