The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-26-2009
HLee1981 HLee1981 is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 35
Remove specific strings from certain fields

I'm working with a set of files where I'm trying to remove a set of characters from specific fields. The files are comma-delimited, and the characters I want to remove include:
- open parentheses - (
- close parentheses - )
- space followed by a dollar sign - $

I don't want to remove every occurrence of these characters as they may occur in fields that I don't want to remove the data from.

How can I remove specific strings from specific fields, like the 4th or 5th fields in a .csv per the information provided above? Thanks much!