I have a lot of files with same number of rows and columns.$2 and $3 are the same in all files .
I need to merge $2,$3,$6 from first file and $6 from another files.
File1:
File2:
File3:
and so on....
Expected Result:
Thanks in advance
Last edited by ali.seifaddini; 05-26-2014 at 05:32 AM..
Hi may i ask how to accomplish this task:
I have 2 files which has multiple columns
first file
1 a
2 b
3 c
4 d
second file
14 a 9 ....
13 b 10....
12 c 11...
11 d 12...
I want to merge the second file to first file that will looks like this
... (2 Replies)
Hi everyone. How can I merge two files, where each file has 2 columns and the first columns in both files are similar? I want all in a file of 4 columns; join command removes the duplicate columns.
1 Dave
2 Mark
3 Paul
1 Apple
2 Orange
3 Grapes
to get it like this in the 3rd file:... (9 Replies)
Hi,
I have tab limited file 1
and tab limited file 2
The output should contain common first column vales and corresponding 2nd column values; AND also unique first column value with corresponding 2nd column value of the file that contains it and 0 for the second file.
the output should... (10 Replies)
Hi all,
I'm looking for a way to merge multiple columns (from one file) into a single column in an output file.
The file I have looks somewhat like this:
@HWI-ST212 1:N:0 AGTCCTACCGGGAGT + @@@DDDDDHHHHHII
@HWI-ST212 1:N:0 CGTTTAAAAATTTCT + @;@B;DDDDH?:F;F... (4 Replies)
Hi all, I've searched the web for a long time trying to figure out how to merge columns from multiple files.
I know paste will append columns like so:
paste file1 file2 file3 file4 file5 ...
But this becomes inconvenient when you want to append a large number of files into a single file.
... (2 Replies)
Hello, I have two files that have this format:
file 1
86.82 0.00 86.82 43.61
86.84 0.00 86.84 43.61
86.86 0.00 86.86 43.61
86.88 0.00 86.88 43.61
file 2
86.82 0.22
86.84 0.22
86.86 0.22
86.88 0.22
I would like to merge these two files such that the final file looks like... (5 Replies)
Hi,
I have a file with 16 columns and out of these 16 columns 14 are key columns, 15 th is order column and 16th column is having information. I need to concate the 16th column based on value of 1-14th column as key in order of 15th column. Here are the example file
Input File (multiple... (3 Replies)
I will like to merge several files using 'cat', but I observe the output is not consistent. the merge begins at the last line of the first file.
file1.txt:
1234
1234
1234
file2.txt:
aaaa
bbbb
cccc
dddd
cat file1.txt file2.txt > file3.txt
file3.txt:
1234
1234
1234aaaa
bbbb
cccc... (13 Replies)
Join and merge multiple files with duplicate key and fill void columns
Hi guys,
I have many files that I want to merge:
file1.csv:
1|abc
1|def
2|ghi
2|jkl
3|mno
3|pqr
file2.csv: (5 Replies)
Discussion started by: yjacknewton
5 Replies
LEARN ABOUT OPENDARWIN
funmerge
funmerge(1) SAORD Documentation funmerge(1)NAME
funmerge - merge one or more Funtools table files
SYNOPSIS
funmerge [-w|-x] -f [colname] <iname1> <iname2> ... <oname>
OPTIONS -f # output a column specifying file from which this event came
-w # adjust position values using WCS info
-x # adjust position values using WCS info and save old values
DESCRIPTION
funmerge merges FITS data from one or more FITS Binary Table files or raw event files.
The first argument to the program specifies the first input FITS table or raw event file. If "stdin" is specified, data are read from the
standard input. Use Funtools Bracket Notation to specify FITS extensions and row filters. Subsequent arguments specify additional event
files and tables to merge. (NB: Stdin cannot not be used for any of these additional input file arguments.) The last argument is the out-
put FITS file. The columns in each input table must be identical.
If an input file begins with the '@' character, it is processed as an include file, i.e., as a text file containing event file names (as
well as blank lines and/or comment lines starting with the '#' sign). If standard input is specified as an include file ('@stdin'), then
file names are read from the standard input until EOF (^D). Event files and include files can be mixed on a command line.
Rows from each table are written sequentially to the output file. If the switch -f [colname] is specified on the command line, an addi-
tional column is added to each row containing the number of the file from which that row was taken (starting from one). In this case, the
corresponding file names are stored in the header parameters having the prefix FUNFIL, i.e., FUNFIL01, FUNFIL02, etc.
Using the -w switch (or -x switch as described below), funmerge also can adjust the position column values using the WCS information in
each file. (By position columns, we mean the columns that the table is binned on, i.e., those columns defined by the bincols= switch, or
(X,Y) by default.) To perform WCS alignment, the WCS of the first file is taken as the base WCS. Each position in subsequent files is
adjusted by first converting it to the sky coordinate in its own WCS coordinate system, then by converting this sky position to the sky
position of the base WCS, and finally converting back to a pixel position in the base system. Note that in order to perform WCS alignment,
the appropriate WCS and TLMIN/TLMAX keywords must already exist in each FITS file.
When performing WCS alignment, you can save the original positions in the output file by using the -x (for "xtra") switch instead of the
-w switch (i.e., using this switch also implies using -w) The old positions are saved in columns having the same name as the original
positional columns, with the added prefix "OLD_".
Examples:
Merge two tables, and preserve the originating file number for each row in the column called "FILE" (along with the corresponding file name
in the header):
[sh] funmerge -f "FILE" test.ev test2.ev merge.ev
Merge two tables with WCS alignment, saving the old position values in 2 additional columns:
[sh] funmerge -x test.ev test2.ev merge.ev
This program only works on raw event files and binary tables. We have not yet implemented image and array merging.
SEE ALSO
See funtools(7) for a list of Funtools help pages
version 1.4.2 January 2, 2008 funmerge(1)