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
In PHP replacing text between TAGS & URI information in Title Tag lowmaster Shell Programming and Scripting 0 06-23-2009 06:16 PM
keeping systems updated wazzu62 Red Hat 4 02-06-2009 11:58 AM
house keeping script Rakesh Bhat UNIX for Dummies Questions & Answers 7 01-03-2006 01:51 AM
keeping history of command legato SUN Solaris 3 11-04-2004 08:41 PM
Keeping the format ... Cameron Shell Programming and Scripting 13 03-05-2002 05:33 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 11-02-2009
petersf petersf is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 5
Keeping the title of a text report

I am in need of keeping a title of a report and removing duplicates from a file like the one below. I will be using the `uniq –u` command for the removal of duplicate lines (let me know if there is a better way rather than the command `uniq`) but I need to keep the title (first 9 lines) of the file. The file will be changing as we receive this raw data, but there will always be a title on each report. Any assistance would be greatly appreciated.

File example:
-----------------------------------------------

Code:
            Well Data Export
Project             :  RAW_DATA_EXTRACT
Cartographic System :  USA_TM20 N2
Depth Mode          :  E_20T
Depth Unit          :  International meters
Distance Unit       :  meters
Format File         :  TD_Curve_Ext.wlx
Date                :  Thu Oct 1 01:56:40 2009

TDP1       1AB0118Z_09507W45
TDP2          01-18-0394
TDP3       fyp_1000m_MMR_5D                 
TDP4
TDP5        0.0000       0.0000
TDP5      592.5000     587.4800
TDP5      593.0000     587.4800
TDP5      593.5000     587.6580
TDP5      594.0000     588.0971
TDP5      594.5000     588.5361
TDP5      595.0000     588.9752
TDP5      595.0000     588.9752
TDP5      595.5000     589.4147
TDP5      596.0000     589.8496
TDP5      596.5000     590.2748
TDP5      596.5000     590.2748
TDP5      597.0000     590.6946


Last edited by vgersh99; 11-02-2009 at 12:56 PM.. Reason: code tags, please!
 

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 06:39 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