Sponsored Content
Top Forums UNIX for Advanced & Expert Users Merge two archives, command line Post 302949361 by 1in10 on Thursday 9th of July 2015 06:56:25 PM
Old 07-09-2015
Merge two archives, command line

this has been a script, that I'd like to run as a command line now, anyway, it worked in a simpler way, but now the terminal complains about the delimiter to the command "cut" that should be a single character.
The aim is to join two files or archives, one with about 8 thousand files merging with a bigger one that contains about 26k files. To make sure that there are no duplicates, I tried many ways, kdfif, diff3, meld, flint, but this command line worked well until now. So is there anyone out there who could give me a hint? Thanks in advance.

Code:
find /home/someuser/thearchive1 -type f -exec sha256sum {} \; | sort -k 64 > /tmp/run.txt | cp -ur /home/someuser/thearchive1 /home/someuser/thearchive3 && cat -n /tmp/run.txt | cut " " -d -f1;
exit 0;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use Perl to merge multi-line into single line

Hi, Can anyone know how to use perl to merge the following multi-line information which beginning with "BAM" into one line. For each line need to delete the return and add a space. Please see the red color line. ******Org. Multi-line) BAM admin 101.203.57.22 ... (3 Replies)
Discussion started by: happyday
3 Replies

2. Shell Programming and Scripting

merge files based on line by line

Hi, lets assume the following details.. file 1 has below details abc|1234|xyz abc1|1234|xyz1 abc2|1234|xyz2 and file 2 has below details pqr|124|lskd ebwer|325|dfb wf|234|sdb I need out put shown below abc|1234|xyz pqr|124|lskd abc1|1234|xyz1 ebwer|325|dfb abc2|1234|xyz2... (4 Replies)
Discussion started by: alnhk
4 Replies

3. Shell Programming and Scripting

Merge 2 files, line by line

Hi all, I've been looking for a way to merge 2 simple text files, line by line using the shell: For example: File1: aaaa bbbb cccc File2: 1111 2222 3333 The 2 files have the same number of lines. I'm trying to obtain: aaaa 1111 bbbb 2222 cccc 3333 (0 Replies)
Discussion started by: venezia
0 Replies

4. UNIX for Dummies Questions & Answers

To merge a few lines to 1 line

Hi Experts, This is my input file. input.txt 0 /dev/fd 25 /var 1 /tmp 1 /var/run 1. If this file has single line, then leave it, print the single line else merge the 4 lines above into 1 line as below e.g (6 Replies)
Discussion started by: streddy
6 Replies

5. Shell Programming and Scripting

Merge multi-line output into a single line

Hello I did do a search and the past threads doesn't really solve my issue. (using various awk commands) I need to combine the output from java -version into 1 line, but I am having difficulties. When you exec java -version, you get: java version "1.5.0_06" Java(TM) 2 Runtime... (5 Replies)
Discussion started by: flagman5
5 Replies

6. Shell Programming and Scripting

Take out First Line and merge all files

Hi Gurus, I have n number of files. Data which is in the files have column headers. I need to take them out and merge into one file. Can you help please? I need to do that little urgent. Thanks (4 Replies)
Discussion started by: raopatwari
4 Replies

7. Shell Programming and Scripting

Merge multiple lines to one line when line starts with and ends with

example: comment Now_TB.table column errac is for error messages 1 - first 2 - second 3 -third ; in this example I need to be able to grab the comment as first word and ; as the last word and it might span a few lines. I need it to be put all in one line without line breaks so I can... (4 Replies)
Discussion started by: wambli
4 Replies

8. UNIX for Dummies Questions & Answers

Merge two files line by line

Hello, i want to merge two files via terminal. After three lines of file one i will append a line of file two: Example: File 1: @chr1_15953153_15953093_1_0_0_0_1:0:0_0:0:0_0/1 TGTCGTAAAATCACAACGTCCCCATCTTTCAAGCCATAAGCAGCCAATGATCTGTGGTTGTCTGTGAGAGGTCTTTCCGCATAGACGATCTACAACAAGA +... (3 Replies)
Discussion started by: Innsbrucker
3 Replies

9. UNIX for Dummies Questions & Answers

How to merge every n lines into one line?

I want to merge every 16 lines into one line, how can I do that? My file looks like below: 0 . 2 2 . 0 0 . 0 0 . 0 0 . 0 0 0 0 0 (2 Replies)
Discussion started by: ml4me
2 Replies

10. UNIX for Beginners Questions & Answers

Merge multi-lines into one single line using shell script or Linux command

Hi, Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line. *****Original Log***** 087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;... (3 Replies)
Discussion started by: rajeshlinux2010
3 Replies
SVK::Command::Merge(3)					User Contributed Perl Documentation				    SVK::Command::Merge(3)

NAME
SVK::Command::Merge - Apply differences between two sources SYNOPSIS
merge -r N:M DEPOTPATH [PATH] merge -r N:M DEPOTPATH1 DEPOTPATH2 merge -r N:M [--to|--from] [PATH] OPTIONS
-r [--revision] N:M : act on revisions between N and M -c [--change] N : act on change N (between revisions N-1 and N) using -N reverses the changes made in revision N -I [--incremental] : apply each change individually -a [--auto] : merge from the previous merge point -l [--log] : use logs of merged revisions as commit message -s [--sync] : synchronize mirrored sources before operation -t [--to] : merge to the specified path -f [--from] : merge from the specified path --summary : display related logs in this merge --verbatim : verbatim merge log without indents and header --no-ticket : do not record this merge point --track-rename : track changes made to renamed node -m [--message] MESSAGE : specify commit message MESSAGE -F [--file] FILENAME : read commit message from FILENAME --template : use the specified message as the template to edit --encoding ENC : treat -m/-F value as being in charset encoding ENC -P [--patch] NAME : instead of commit, save this change as a patch -S [--sign] : sign this change -C [--check-only] : try operation but make no changes --direct : commit directly even if the path is mirrored perl v5.10.0 2008-08-04 SVK::Command::Merge(3)
All times are GMT -4. The time now is 04:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy