Sponsored Content
Top Forums Shell Programming and Scripting problen with a join under AIX Post 64717 by zazzybob on Wednesday 2nd of March 2005 05:32:42 AM
Old 03-02-2005
The files must be correctly sorted into ASCII order...
Code:
$ sort -t: -k1,1 file1.txt > file1.sorted
$ sort -t: -k1,1 file2.txt > file2.sorted
$ join -t: file1.sorted file2.sorted
test:zone 1:zone 2:zone 3 :zone 4: zone 5
test10:zone 1:zone 2:zone 3 :zone 4:zone 5
test100:zone 1 :zone 2:zone 3 :zone 4:zone 5

Cheers
ZB
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join (pls help on join command)

Hi, I am a new learner of join command. Some result really make me confused. Please kindly help me. input: file1: LEO oracle engineer 210375 P.Jones Office Runner ID897 L.Clip Personl Chief ID982 S.Round UNIX admin ID6 file2: Dept2C ID897 6 years Dept5Z ID982 1 year Dept3S ID6 2... (1 Reply)
Discussion started by: summer_cherry
1 Replies

2. UNIX for Dummies Questions & Answers

Join

Hi, Is there a way to get join to join 2 files even if in one file one of the records does not exist? i.e. 1st file aaa 50 bbb 60 2nd file aaa 40 So i want to join the 2 files together and get the following output: aaa 50 aaa 40 bbb 60 bbb 0 Is this possible??? Thanks Jason (5 Replies)
Discussion started by: jazz8146
5 Replies

3. Shell Programming and Scripting

Problen in a bash script

Hi New post, and new member I have a problem with a bash script And I probably look't at for so long that I DON'T See a obvious syntax error The reason for the script is to selectively change permission, UID, GID within A selected /dir Anny help or insight would be appreciated... (2 Replies)
Discussion started by: Ex-Capsa
2 Replies

4. Programming

sql,multiple join,outer join issue

example sql: select a.a1,b.b1,c.c1,d.d1,e.e1 from a left outer join b on a.x=b.x left outer join c on b.y=c.y left outer join d on d.z=a.z inner join a.t=e.t I know how single outer or inner join works in sql. But I don't really understand when there are multiple of them. can... (0 Replies)
Discussion started by: robbiezr
0 Replies

5. UNIX for Dummies Questions & Answers

Join 2 files with multiple columns: awk/grep/join?

Hello, My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns: File A: (tab-delimited) PDB CHAIN Start End Fragment 1avq A 171 176 awyfan 1avq A 172 177 wyfany 1c7k A 2 7... (3 Replies)
Discussion started by: InfoSeeker
3 Replies

6. Shell Programming and Scripting

AIX : Need help with <join> command in csh

Hi All, I need your hand to resolve an issue I am facing with a join command in one of the script. Please see the 3 files attached where file1 and file2 are the two files I am passing to the join command written in the command file. Prior to calling the join I am also sorting both the files on... (6 Replies)
Discussion started by: sraj142
6 Replies

7. UNIX for Dummies Questions & Answers

how to join two files using "Join" command with one common field in this problem?

file1: Toronto:12439755:1076359:July 1, 1867:6 Quebec City:7560592:1542056:July 1, 1867:5 Halifax:938134:55284:July 1, 1867:4 Fredericton:751400:72908:July 1, 1867:3 Winnipeg:1170300:647797:July 15, 1870:7 Victoria:4168123:944735:July 20, 1871:10 Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies

8. AIX

Nim on AIX 7.1 used to migrate AIX 5.3 to AIX 6.1...is possible?

Using nimadm: nimadm -j nimadmvg -c sap024 -s spot_6100 -l lpp_6100 -d "hdisk1" -Y Initializing the NIM master. Initializing NIM client sap024. 0505-205 nimadm: The level of bos.alt_disk_install.rte installed in SPOT spot_6100 (6.1.3.4) does not match the NIM master's level (7.1.1.2).... (2 Replies)
Discussion started by: sciacca75
2 Replies

9. UNIX for Dummies Questions & Answers

How to use the the join command to join multiple files by a common column

Hi, I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column). I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies

10. Shell Programming and Scripting

Join, merge, fill NULL the void columns of multiples files like sql "LEFT JOIN" by using awk

Hello, This post is already here but want to do this with another way Merge multiples files with multiples duplicates keys by filling "NULL" the void columns for anothers joinning files file1.csv: 1|abc 1|def 2|ghi 2|jkl 3|mno 3|pqr file2.csv: 1|123|jojo 1|NULL|bibi... (2 Replies)
Discussion started by: yjacknewton
2 Replies
App::AllKnowingDNS::Config(3pm) 			User Contributed Perl Documentation			   App::AllKnowingDNS::Config(3pm)

NAME
App::AllKnowingDNS::Config - configuration object DESCRIPTION
Note: User documentation is in all-knowing-dns(1). This module defines an object which holds the parsed version of the AllKnowingDNS configuration file. FUNCTIONS
zone_for_ptr($zone) Returns the appropriate zone for the given PTR query or undef if there is no appropriate zone. Example: my $query = '7.c.e.2.3.4.e.f.f.f.b.d.9.1.2.0.' . '0.c.c.c.e.0.0.1.8.8.d.4.1.0.0.2.ip6.arpa'; my $zone = $config->zone_for_ptr($query); return 'NXDOMAIN' unless defined($zone); ... zone_for_aaaa($zone) Returns the appropriate zone for the given AAAA query or undef if there is no appropriate zone. Example: my $query = 'ipv6-foo.nutzer.raumzeitlabor.de'; my $zone = $config->zone_for_aaaa($query); return 'NXDOMAIN' unless defined($zone); ... VERSION
Version 1.3 AUTHOR
Michael Stapelberg, "<michael at stapelberg.de>" LICENSE AND COPYRIGHT
Copyright 2012 Michael Stapelberg. This program is free software; you can redistribute it and/or modify it under the terms of the BSD license. perl v5.14.2 2012-03-28 App::AllKnowingDNS::Config(3pm)
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy