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



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
removing duplicates stevie_velvet Shell Programming and Scripting 5 07-07-2008 07:42 AM
removing leading zero risshanth UNIX for Dummies Questions & Answers 0 02-08-2008 06:51 AM
removing duplicates and sort -k orahi001 UNIX for Dummies Questions & Answers 3 01-25-2008 09:59 AM
Stripping leading spaces on right justified name Marcia P UNIX for Dummies Questions & Answers 2 02-28-2006 10:32 PM
Removing duplicates giannicello Shell Programming and Scripting 12 09-14-2005 06:12 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 03-18-2009
crazyhpux crazyhpux is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 14
Adding Leading Zero with Right Justified and Removing Duplicates

hello everyone. I'm hoping someone can help me out here. I have 2 files. It looks like this:

File 1:

abc1, defg, 50.00, mno,990
abc2, cats, 100.00, pops,991
abc3, dogs, 1.00, treat,992


File 2:

990, airplanes, runway, doctor
991, jets, birds, much
990, *airplanes,runway,doctor
992, cars, ford, toyota

Here is what I would like to do:

1. In file 1, column 3, the amount, i would like it to be right justified with leading zero

2. In file 2, all the duplicate need to be removed. Like 990, *airplanes

3. After file 1 and 2 are done, then join them by using the key in column 5 in file 1 and column 1 in file 2.

If you need more clarification, let me know. I appreciate it greatly if someone can help me out. Thank you.
 

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 03:09 PM.


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