UNIX one line cmd join 2 sets of data from 2 files
Hi all,
This is my first and undoubtedly many posts to come. I'm new to using unix and would like a hand with this problem I have. What i'm trying to do is match 2 sets of data from 2 files and put result into file 3. Sounds simply but there is a catch, the match is a "partial field" match, if this is possible? The data is sorted by file 1 via date field only. I have space delimited the fields for easier access, used SED to get rid of | and white spaces. There are no headings for the data sets either.
FYI: Using AIX unix
As you can see, I'm trying to match file 2 to file 1 and input the file 2, field 2 to a partial match in file 1, field 1 into my desired file 3
EG (File 1, field 1 ACEI234-123 is a match to File 2, Field 1 234 PRW)
I would like non matches to be also left blank and with equal white spaces in between. Eventually I would have to convert to csv for excel.
I'm going to assume that the values in column 1 of file 2 are unique.
There might be a way with the paste command, but I've not used that much myself. I'm sure an awk will be more than capable, but I have a shell option for you. This might be a bit slow, but try:-
I hope that this helps. Let us know if this is acceptable or misses the point.
Hello,
I am trying to write a unix cmd , that if files in folder /path/FTP are all zero kb or empty then good to go, if not empty then sleep for 8 hrs.
Following cmd list me the files which are not empty, But when I am incorporating IF ELSE cmd fails
find /path/FTP. -type f -exec wc -l {}... (6 Replies)
Hi,
I am using SunOS
I want to serch my previous command
from unix prompt
(like on AIX we can search by ESC -k)
how to get in SunOs
urgent help require. (10 Replies)
i had a file where lines appear to be broken when they shouldn't
eg
Line 1. kerl abc sdskd sdsjkdlsd sdsdksd \
Line 2. ksdkks sdnjs djsdjsd
i can do a shift join to combine the lines but i there are plenty of files with this issue
Line 1. kerl abc sdskd sdsjkdlsd sdsdksd ksdkks sdnjs... (6 Replies)
Hi everyone,
I posted this earlier, but the idea changed since then and I figured it would make more sense if I repost with a clearer idea in hopes someone can help me out.
I have two lists of data in file1 and file 2
file1 (tab separated - column1 column2 column 3)
1 91625106 ... (1 Reply)
Hello all and thanks in advance!
What I'm looking to do is insert a blank line, anytime the first 9 characters of a given line don't match the first 9 characters of the previous line.
i.e.
Convert the data set
1 45 64 89
1 89 69 235
2 89 234 67
2 56 90... (1 Reply)
I need a simple command line executable that allows me to join many wmv files into one output wmv file, preferrably in a simple way like this:
wmvjoin file1.wmv file2.wmv .... > outputfile.wmv
So what I want is the wmv-equivalent of mpgtx
I cannot find it on internet.
Thanks. (2 Replies)
timbass
Sat, 28 Jul 2007 10:07:53 +0000
Originally posted in Yahoo! CEP-Interest
Here is my follow-up note on posets (partially ordered sets) and tosets (totally or linearly ordered sets) as background set theory for event processing, and in particular CEP and ESP.
In my last note, we... (0 Replies)
Hi,
I have 7 big flat files, each contains 24 million records which have been sorted by the first field delimitered by Ctrl B (002).
I want to join them together side by side, eg.
File A:
1^Ba^Bb
2^Bx^By
....
File B:
1^Bc^Bd
2^Bm^Bn
....
After merged, it should look like :... (7 Replies)