05-08-2008
Granting that the two files have a common field in each line, I guess the join utility will solve your problem.
EDIT: join can make it but for your requirements it will need a lot of work than using cut and paste as suggested by shiv.
Last edited by yongitz; 05-08-2008 at 07:10 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need few clarification in types of paste command ussage in coulmn mode :
In a directory i have few file distinguished as *.cpu *.vmem and *.mem
and have coulmn entries like
first cpu file
89576
89576
89576
89576
89576
89576
89576
second cpu file
46312
46312
46312 (3 Replies)
Discussion started by: er_aparna
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am trying to ssh between two differnt versions on solaris boxes.
The src box has the SSH Secure Shell 3.1.0 on sparc-sun-solaris2.6 and destination has SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0.
I am not trying for passwordless connection. I just want to get it working with a... (3 Replies)
Discussion started by: borncrazy
3 Replies
3. Shell Programming and Scripting
hi,
i am facing a problem in merging two files using awk,
the problem is as stated below,
file1:
A|B|C|D|E|F|G|H|I|1
M|N|O|P|Q|R|S|T|U|2
AA|BB|CC|DD|EE|FF|GG|HH|II|1
....
....
....
file2 :
1|Mn|op|qr (2 Replies)
Discussion started by: shashi1982
2 Replies
4. Shell Programming and Scripting
Hi,
I am trying to replace a specific column values in a csv file with double quotes.
Example:
SNO,NAME,ZIPCODE,RANK
1,Robert,74538,12
2,Sam,07564,13
3,Kim, Ed,12345,14
Desired Output:
SNO,NAME,ZIPCODE,RANK
1,Robert Ken,74538,12
2,Sam Mik,"07564",13
3,"Kim, Ed",12345,14
I... (3 Replies)
Discussion started by: techmoris
3 Replies
5. Shell Programming and Scripting
Hi,
I need to run a script in two different login's in the same server, but it is running only in one login, i have used the corresponding PATH for each login, but still it says " not authorized to put msg in queue". (2 Replies)
Discussion started by: savithavijay
2 Replies
6. Windows & DOS: Issues & Discussions
I have files existing with same names in the folders with date as display below
c:\2010-09-10 <==== folder
arr1.jpg
arr2.jpg
arr3.jpg
arr4.jpg
c:\2010-09-09 <==== folder
arr1.jpg
arr2.jpg
c:\2010-09-08 <==== folder
arr2.jpg
arr3.jpg
arr4.jpg
... (5 Replies)
Discussion started by: jville
5 Replies
7. Shell Programming and Scripting
My question is
I am finding the new.txt file in the directory
I am finding current.txt file in the directory in 2nd time
I am finding fallback.txt in the directory in 3rd time
all with find command
now my question is
let suppose I got all threee files in one directory then I want... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies
8. UNIX for Dummies Questions & Answers
normally I
rsync -haPE source destination
What I want to do is take a old ~ directory from an external drive and have it ONLY update missing files NOT replace existing files. excluding ~/library
any help would be great. (3 Replies)
Discussion started by: briandanielz
3 Replies
9. Shell Programming and Scripting
Hi,
My requirement is,there is a directory location like:
:camp/current/
In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Discussion started by: srikanth_sagi
10 Replies
10. Shell Programming and Scripting
Hello everzone,
I have a column of values and i need to find arcsin for evry value in this column. I am very new to shell scripting and would be glad to receive any help regarding this. Also i want them to be saved in the next column.
Desired output:
# #
a arcsin(a)
b arcsin(b)
c ... (10 Replies)
Discussion started by: dinesh.n
10 Replies
merge(1) merge(1)
NAME
merge - three-way file merge
SYNOPSIS
merge [-Llabel1 [-Llabel3]] [-p] [-q] file1 file2 file3
DESCRIPTION
merge incorporates all changes that lead from file2 to file3 into file1. The result goes to standard output if -p is present, into file1
otherwise. merge is useful for combining separate changes to an original. Suppose file2 is the original, and both file1 and file3 are
modifications of file2. Then merge combines both changes.
An overlap occurs if both file1 and file3 have changes in a common segment of lines. On a few older hosts where diff3 does not support the
-E option, merge does not detect overlaps, and merely supplies the changed lines from file3. On most hosts, if overlaps occur, merge out-
puts a message (unless the -q option is given), and includes both alternatives in the result. The alternatives are delimited as follows:
<<<<<<< file1 lines in file1 ======= lines in file3 >>>>>>> file3
If there are overlaps, the user should edit the result and delete one of the alternatives. If the -L label1 and -L label3 options are
given, the labels are output in place of the names file1 and file3 in overlap reports.
DIAGNOSTICS
Exit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble.
IDENTIFICATION
Author: Walter F. Tichy.
Revision Number: 1.1.6.2; Release Date: 1993/10/07.
Copyright (C) 1982, 1988, 1989 by Walter F. Tichy.
Copyright (C) 1990, 1991 by Paul Eggert.
SEE ALSO
diff3(1), diff(1), rcsmerge(1), co(1)
merge(1)