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
Changing one column of delimited file column to fixed width column manneni prakash Shell Programming and Scripting 5 06-22-2009 06:27 AM
two files.say a and b.both have long columns.i wanna match the column fron 1st file w TRUPTI UNIX for Dummies Questions & Answers 4 10-17-2008 02:17 PM
Insert first line of a file to first column of remaining files a_artha Shell Programming and Scripting 5 07-28-2008 06:47 AM
How to check Null values in a file column by column if columns are Not NULLs Mandab Shell Programming and Scripting 7 03-15-2008 09:57 AM
join cols from multi files into one file vbshuru Shell Programming and Scripting 2 11-20-2003 12:52 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 06-30-2009
bigsmile bigsmile is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 4
Question Join 3 files using key column in a mapping file

I'm new of UNIX shell scripting. I'm recently generating a excel report in UNIX(file with delimiter is fine). How should I make a script to do it?

1 file to join comes from output of one UNIX command, the second from another UNIX command, and third from a database query. The key columes of all these 3 files come from a mapping file. It's basically as following:

MappingFile:
===========
job1 a_name1
job2 c_name2
job3 b_name3
job4 e_name4

file1_toJOIN:
============
b_name3 12:00:03 15:00:09
e_name4 10:30:00 11:00:00
c_name2 09:40:00 10:12:00
a_name1 22:00:00 23:00:00

file2_toJOIN:
=============
job2 tom 22
job1 dan 18
job4 jim 25
job3 kim 20

the spreadsheet format to generate:
===========================
job1 22:00:00 23:00:00 01:00:00 dan 18
......

Appreciate your help!
 

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:42 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