I would like to merge data from a reference file and a data file to produce a new output file as shown below.
Reference file,data file,output file
a , b 2 , a 0
b , d 4 , b 2
c , , c 0
d , , d 4
e, , e 0 (3 Replies)
Hi,
I am new to awk/unix and am trying to put together an awk script to perform an action similar to vlookup between the two csv files.
Here are the contents of the two files:
File 1:
Date,ParentID,Number,Area,Volume,Dimensions
2014-01-01,ABC,247,83430.33,857.84,8110.76... (9 Replies)
Hi folks,
awk 'NR==FNR {m=$0; next} $1 in m{$0=m} {print}' file2 file1
Works a charm for a vlookup type query, sourced from https://www.unix.com/shell-programming-and-scripting/215998-vlookup-using-awk.html
However my column content has white spaces and numbers. Example
file1
The Man... (6 Replies)
Hello Everybody
I am looking for vlookup like functionality in Linux since two files I have are very big(1000MB each) and its not opening completely in excel.
Here the requirement
file1
11,12,13
16,14,12
28,21,22
22,23,24 file 3
18,16,16
14,12,12
23,22,24
16,11,13 here... (8 Replies)
I need to vlookup and check the server not found.
Source file 1
server1
server2
server3
server4
server5_root
server6_silver
server7
server7-test
server7-temp
Source file 2
server1_bronze (6 Replies)
Hi everyone,
I need to replace values of column 2 array1 with values of column 2 array2 based on a lookup of column 4 value, but only return a value IF the values in column 1 of BOTH array1 and array2 match, otherwise keep original value in column 2 of array1. Both files are tab delimited... (2 Replies)
Hello, i am trying to print group name column(etc/group) on script (etc/passwd) since group name is not listed on etc/passwd columns. Im trying to do a vlookup. but i cant figure out how i can insert the vlookup command FNR==NR inside the print out command or the output. I also tried exporting... (2 Replies)
Hi I just want again to ask for help on what command to use to vlookup f1 group name in "/etc/group" matching f3 of it to "/etc/passwd" f4. I do need to display group name in the output of /etc/passwd without using awk or NR==FNR command. thank you
while
IFS=: read -r f1 f2 f3 f4 f5 f6 f7... (4 Replies)
Hi,
I want to compare same column in two files, if values match then display the column or display "NA".
Ex :
File 1 :
123
abc
xyz
pqr
File 2:
122
aab
fdf
pqr
fff
qqq
rrr (1 Reply)
Discussion started by: hkoshekay
1 Replies
LEARN ABOUT DEBIAN
ssss-combine
ssss(1) General Commands Manual ssss(1)NAME
ssss - Split and Combine Secrets using Shamir's Secret Sharing Scheme.
SYNOPSIS
ssss-split -t threshold -n shares [-w token] [-s level] [-x] [-q] [-Q] [-D] [-v]
ssss-combine -t threshold [-x] [-q] [-Q] [-D] [-v]
DESCRIPTION
ssss is an implementation of Shamir's Secret Sharing Scheme. The program suite does both: the generation of shares for a known secret, and
the reconstruction of a secret using user-provided shares.
COMMANDS
ssss-split: prompt the user for a secret and generate a set of corresponding shares.
ssss-combine: read in a set of shares and reconstruct the secret.
OPTIONS -t threshold
Specify the number of shares necessary to reconstruct the secret.
-n shares
Specify the number of shares to be generated.
-w token
Text token to name shares in order to avoid confusion in case one utilizes secret sharing to protect several independent secrets.
The generated shares are prefixed by these tokens.
-s level
Enforce the scheme's security level (in bits). This option implies an upper bound for the length of the shared secret (shorter
secrets are padded). Only multiples of 8 in the range from 8 to 1024 are allowed. If this option is ommitted (or the value given is
0) the security level is chosen automatically depending on the secret's length. The security level directly determines the length of
the shares.
-x Hex mode: use hexadecimal digits in place of ASCII characters for I/O. This is useful if one wants to protect binary data, like
block cipher keys.
-q Quiet mode: disable all unnecessary output. Useful in scripts.
-Q Extra quiet mode: like -q, but also suppress warnings.
-D Disable the diffusion layer added in version 0.2. This option is needed when shares are combined that where generated with ssss ver-
sion 0.1.
-v Print version information.
EXAMPLE
In case you want to protect your login password with a set of ten shares in such a way that any three of them can reconstruct the password,
you simply run the command
ssss-split -t 3 -n 10 -w passwd
To reconstruct the password pass three of the generated shares (in any order) to
ssss-combine -t 3
NOTES
To protect a secret larger than 1024 bits a hybrid technique has to be applied: encrypt the secret with a block cipher and apply secret
sharing to just the key. Among others openssl and gpg can do the encryption part:
openssl bf -e < file.plain > file.encrypted
gpg -c < file.plain > file.encrypted
SECURITY
ssss tries to lock its virtual address space into RAM for privacy reasons. But this may fail for two reasons: either the current uid
doesn't permit page locking, or the RLIMIT_MEMLOCK is set too low. After printing a warning message ssss will run even without obtaining
the desired mlock.
AUTHOR
This software (v0.5) was written in 2006 by B. Poettering (ssss AT point-at-infinity.org). Find the newest version of ssss on the project's
homepage: http://point-at-infinity.org/ssss/.
FURTHER READING
http://en.wikipedia.org/wiki/Secret_sharing
Manuals User ssss(1)