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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Combining information from a comma delimited file vzismann UNIX for Dummies Questions & Answers 1 08-06-2007 07:20 PM
Parsing comma delimited text file chengwei Shell Programming and Scripting 5 02-23-2007 05:38 AM
Loading a comma Delimited file into an Array grandtheftander UNIX for Dummies Questions & Answers 2 07-26-2006 02:19 PM
Converting Tab delimited file to Comma delimited file in Unix charan81 Shell Programming and Scripting 22 01-20-2006 09:24 AM
Comma Delimited file dbrundrett Shell Programming and Scripting 2 04-05-2004 11:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-20-2008
dolo21taf dolo21taf is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 6
How do you delete multiple text from a comma delimited file

I would like to know code that will delete multiple text from a comma delimited file. For example, how would the comma delimited file below delete the word 'PEST' in Perl language (previously an excel file that was converted to a csv and the last column was PEST):


1, 2,43,34, bosx,PEST
1, 2,53,24, boax,PEST
1, 2,63,14, bovx,PEST
1, 2,73,44, boxb,PEST
1, 2,93,54, boxb,PEST

Please help me the best way you can, I greatly appreciate it
  #2 (permalink)  
Old 02-20-2008
manikantants manikantants is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 131
You can achieve this as follows (Assuming content will be in file 'file1')
sed 's/PEST//' file1
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0