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
file merge siba.s.nayak UNIX for Dummies Questions & Answers 6 12-15-2008 01:47 AM
range in hosts file daveisme AIX 4 12-11-2008 11:42 AM
Merge two files whose names are given in other file harshada Shell Programming and Scripting 1 10-01-2008 05:17 AM
Urgent help on grep the nearest value ahjiefreak Shell Programming and Scripting 2 04-02-2008 10:24 AM
merge two files in one file nvkuriseti Shell Programming and Scripting 3 08-27-2007 07:06 AM

Closed Thread
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
  #1 (permalink)  
Old 02-10-2009
bogu0001 bogu0001 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 32
merge file with nearest range !!!!!!!

I want join 2 files with range of numbers in ascending order according to the value of the numbers the input will be like this

INPUT

file1
column1 column2
10 14
20 25
56 58
83 90
FILE 2
column1 column 2
1 2
2 8
10 14
20 24
50 58
60 63
70 76
80 100

OUTPUT
col1 col2 col3 col4
1 2
2 8
10 14 10 14
20 25 20 24
56 58 50 58
70 76
83 90 80 100
  #2 (permalink)  
Old 02-10-2009
bogu0001 bogu0001 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 32
merge file with nearest range !!!!!!!

I want join 2 files with range of numbers in ascending order according to the value of the numbers the input will be like this

INPUT

file1
column1 column2
10 14
20 25
56 58
83 90
FILE 2
column1 column 2
1 2
2 8
10 14
20 24
50 58
60 63
70 76
80 100

OUTPUT
col1 col2 col3 col4
1 2
2 8
10 14 10 14
20 25 20 24
56 58 50 58
70 76
83 90 80 100
  #3 (permalink)  
Old 02-10-2009
bogu0001 bogu0001 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 32
any help would be appreciated
  #4 (permalink)  
Old 02-10-2009
danmero danmero is online now Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,449
If you search the forum one of your colleague just ask a similar question few days ago
  #5 (permalink)  
Old 02-10-2009
bogu0001 bogu0001 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 32
Help would be appreciated
  #6 (permalink)  
Old 02-11-2009
bogu0001 bogu0001 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 32
finding nearest numbers

Hey guys I would like to know how to find nearest numbers based on second column in 1st column some thing like this

Input
col1 col2
10 20
30 40
48 64
55 71
70 90

output
col1 col2 col3
10 20 30
30 40 48
48 64 70
55 71
70 90
  #7 (permalink)  
Old 02-11-2009
bogu0001 bogu0001 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 32
I need col 3
Closed Thread

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 07:37 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