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 > 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
parsing data file picking out certain fields timj123 Shell Programming and Scripting 8 03-05-2008 06:57 PM
Listing out three fields of data damion UNIX for Dummies Questions & Answers 3 11-08-2007 08:32 PM
How can i remove spaces in between the fields in a file dsravan Shell Programming and Scripting 3 09-26-2006 04:11 PM
How to change Raw data to Coloumn data fields Nayanajith Shell Programming and Scripting 1 08-29-2006 01:23 AM
Identifying new fields of data davels SUN Solaris 0 01-10-2005 11:06 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-14-2007
greengrass greengrass is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 9
Remove Data from Fields

I would like some sugestions on how to solve the following problem with removing selected data from fields. Each day I receive a file containing 22,000 records that I use a combination of awk and the cut command to remove unwanted fields. This is a work in process as I learn more about awk, sed and other tools.

The problem I am struggling with is how can i remove only the time stamp, days, day from the last field? I only want the number days in the last field. For days less than 1 if I can place a "0" in field great, I think a blank will work for now.

Below is a sample of the file output.
Thanks

|1|8|0|0|10 days, 5:35:33
|1|8|0|0|0:00:00
|1|8|0|0|18 days, 12:08:44
|1|8|0|0|0:09:25
|1|8|0|0|23:59:25
|1|8|0|0|1 day, 1:16:25
 

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 11:24 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