06-01-2015
In cases like these, when I merge files, I will throw in an extra field to convey the filename of where the record came in the event I want to get rid of the separate files. So I would throw in a fourth field like "source" and put the filename in it. You don't have to include this extra field in your sort (so you could do sort by fields date, inbound, and outbound (disclude source) and use "," as the delimiter for the sort keys.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have 2 files pipe delimted and want to merge them based on a key
e.g file 1
123$aaa$yyy$zzz
345$xab$yzy$zyz
456$sss$ttt$foo
799$aaa$ggg$dee
file 2
123$hhh
345$ddd
456$xxx
888$zzz
so if the key is the first field, and the result should be the common key between file 1 and 2 (6 Replies)
Discussion started by: loloAix
6 Replies
2. Shell Programming and Scripting
Help in writing a script using sed which updates fileOne with the contents from fileTwo
Example:
Contents of fileOne
1,111111
2,897823
3,235473
4,222222
Contents of fileTwo
1,111111,A,1,2
4,222222,A,2,2
5,374632,A,3,2
6,374654,A,4,2
Final File should be:
1,111111,A,1,2... (9 Replies)
Discussion started by: NewToSed
9 Replies
3. Shell Programming and Scripting
Hello everyone!!
I am not completely new to shell script but I havent been able to find the answer to my problem and I'm sure there are some smart brains here up for the challenge :D.
I have several CSV files that I need to combine into one, but I also need to know where each row came from.... (7 Replies)
Discussion started by: fransanchezoria
7 Replies
4. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
5. Shell Programming and Scripting
Does anyone know how to Merge *.csv files, each in seperate sheets? (7 Replies)
Discussion started by: frhling
7 Replies
6. UNIX for Dummies Questions & Answers
:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux.
I am working in Linux terminal.
I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I have two separate csv files(comma delimited) file 1 and file 2.
File 1 contains
PAN,NAME,Salary
AAAAA5467D,Raj,50000
AAFAC5467D,Ram,60000
BDCFA5677D,Kumar,90000
File 2 contains
PAN,NAME,Dept,Salary
ASDFG6756T,Karthik,ABC,450000
QWERT8765Y,JAX,CDR,780000... (5 Replies)
Discussion started by: Nivas
5 Replies
8. Shell Programming and Scripting
I am trying to merge all csv files from source path into one single csv file in target. but getting error message:
hadoop fs -cat /user/hive/warehouse/stage.db/PK_CLOUD_CHARGE/TCH-charge_*.csv > /user/hive/warehouse/stage.db/PK_CLOUD_CHARGE/final/TCH_pb_charge.csv
getting error message:... (0 Replies)
Discussion started by: cplusplus1
0 Replies
9. Shell Programming and Scripting
Hi all,
i need help.
I have two csv files with a huge amount of data.
I need the first column of the first file, to be compared with the data of the second, to have at the end a file with the data not present in the second file.
Example
File1: (only one column)
profile_id
57036226... (11 Replies)
Discussion started by: SirMannu
11 Replies
10. UNIX for Beginners Questions & Answers
I have three files with similar pattern i need to merge all the coloumns side by side from all three files according to the first coloumn example as shown below
I mentioned 5 coloumns only in example but i have around 15 coloumns in each file.
file1:
Name,Samples,Error,95RT,90RT... (4 Replies)
Discussion started by: Raghuram717
4 Replies
LEARN ABOUT XFREE86
dpkg-scansources
dpkg-scansources(1) dpkg suite dpkg-scansources(1)
NAME
dpkg-scansources - create Sources index files
SYNOPSIS
dpkg-scansources [option...] binary-dir [override-file [path-prefix]] > Sources
DESCRIPTION
dpkg-scansources scans the given binary-dir for .dsc files. These are used to create a Debian source index, which is output to stdout.
The override-file, if given, is used to set priorities in the resulting index records and to override the maintainer field given in the
.dsc files. The file can be compressed (since dpkg 1.15.5). See deb-override(5) for the format of this file. Note: Since the override
file is indexed by binary, not source packages, there's a bit of a problem here. The current implementation uses the highest priority of
all the binary packages produced by a .dsc file for the priority of the source package, and the override entry for the first binary package
listed in the .dsc file to modify maintainer information. This might change.
The path-prefix, if given, is prepended to the directory field in the generated source index. You generally use this to make the directory
fields contain the path from the top of the Debian archive hierarchy.
Note: If you want to access the generated Sources file with apt(8) you will probably need to compress the file with gzip(1) (generating a
Sources.gz file). apt ignores uncompressed Sources files except on local access (i.e. file:// sources).
OPTIONS
-n, --no-sort
Don't sort the index records. Normally they are sorted by source package name.
-e, --extra-override file
Scan file to find supplementary overrides (since dpkg 1.15.4; the file can be compressed since dpkg 1.15.5). See deb-extra-override(5)
for more information on its format.
-s, --source-override file
Use file as the source override file (the file can be compressed since dpkg 1.15.5). The default is the name of the override file you
specified with .src appended.
The source override file is in a different format from the binary override file. It contains only two whitespace separated fields, the
first is the source package name and the second is the section. Blank lines and comment lines are ignored in the normal manner. If a
package appears in both files the source override takes precedence for setting the section.
--debug
Turn debugging on.
--help
Show the usage message and exit.
--version
Show the version and exit.
SEE ALSO
deb-override(5), deb-extra-override(5), dpkg-scanpackages(1).
1.19.0.5 2018-04-16 dpkg-scansources(1)