The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using 'sed' to delete or ignore columns in a dataset aarif UNIX for Dummies Questions & Answers 4 07-21-2008 09:22 AM
Numbers of records in SAS dataset sasaliasim Shell Programming and Scripting 2 04-21-2008 01:55 PM
Delete particular value from file using 'sed' sai_nj Shell Programming and Scripting 2 03-30-2008 09:38 PM
delete some columns su_in99 UNIX for Dummies Questions & Answers 7 05-15-2007 11:08 PM
Accessing Mainframe Dataset IcyGuava UNIX for Dummies Questions & Answers 4 10-18-2001 05:12 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-29-2008
Registered User
 

Join Date: Feb 2008
Posts: 6
Using 'sed' to delete or ignore columns in a dataset

Hi,

I've already posted elsewhere but am posting again here coz im a newbie. I hope you forgive me this time.

I want to know if its possible to delete or ignore columns in a large dataset using 'sed'. For example, I have the following dataset: -

20060714,X.XX,1,043004,Q,T,24.0000,1,25.5000,4,
20060714,X.XX,1,081209,Q,T,24.0000,1,25.5000,5,

As you can see, there are 10 columns here and the table that I am inserting into has 8 columns.

I want to delete the 3rd column (i.e. the 1's) and I want to delete the comma between Q and T. Finally I want to delete the comma at the end.

Is this possible with sed? Can any1 help me with this please?

I'll be extremely grateful if someone can help with this!! You can PM me or post back here.

Many Thanks, asif.
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




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