Sponsored Content
Top Forums Shell Programming and Scripting Need assistance with an IF statement to compare a list of SHA keys between two repositories. Post 303035715 by Query on Friday 31st of May 2019 06:20:11 PM
Old 05-31-2019
Need assistance with an IF statement to compare a list of SHA keys between two repositories.

Hello.

My first time here.

What I am trying to do is this.

FileA is located on a web server
FileB is located on local storage

Both files contain a large list of information of not only SHA keys but versions, and other information.

I need a statement that can compare between FileA and FileB and ONLY the SHA keys in the file.
  • If the statement finds that ALL of the SHA key's listed on File A are ALSO in located anywhere in File B, its a match.
  • If it cannot find the SHA key on FileB, its is not a match and the missing SHA keys need to be printed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Very urgent :- How to compare string using if statement

Hi How can i compare a string using if statement in a script? For eg: I have filename="abc.sh" if ;then { ....... ....... } fi but this doesnot work .. How will i execute this ?? Thanks in advance (1 Reply)
Discussion started by: jisha
1 Replies

2. Shell Programming and Scripting

AWK statement formatting assistance

I am writing a script that ssh's out to our various servers and extracts diskspace info to generate into a report. With the mix of servers linux/solairs 8-10/AIX the easiest way is to use df -k (though I much rather prefer df -h). I have pasted the relevant code: dfdata=`ssh -q -o... (1 Reply)
Discussion started by: rkruck
1 Replies

3. Shell Programming and Scripting

Compare files column to column based on keys

Here is my situation. I need to compare two tab separated files (diff is not useful since there could be known difference between files). I have found similar posts , but not fully matching.I was thinking of writing a shell script using cut and grep and while loop but after going thru posts it... (2 Replies)
Discussion started by: blackjack101
2 Replies

4. Shell Programming and Scripting

awk if statement to evaluate string and compare

I have the following simplified code that I am planning on putting into a larger shell script. I have been butchering it to try and make work amongst google searches and reading awk documentation. amixer sset Master toggle | awk '{ if ( /^ Front Left/ { print $7 } == // ) print "MUTED" }'I... (2 Replies)
Discussion started by: jelloir
2 Replies

5. Debian

Repositories in sources.list

I'm just interested to know how your sources.list look like. I got some repositories witch give some errors and I would like to clean it up. and when I do apt-get update I get few lines showing errors like 404 , this is how my list look like: # deb cdrom:/ squeeze main # deb cdrom:/... (0 Replies)
Discussion started by: zdorian
0 Replies

6. Linux

Convert MD5 password to SHA-512?

Hi, Is it possible to convert MD5 passwords to SHA-512? I'm about to migrate an old slackware server to Debian, then I noticed that they don't use same encryption method. I'm aware that I can change the encryption method in Debian to MD5, but as far as I understand SHA-512 is more secure,... (2 Replies)
Discussion started by: urandom
2 Replies

7. Shell Programming and Scripting

Compare strings with space in if statement

DEV> vi test_if_statement.sh "test_if_statement.sh" 9 lines, 205 characters proc_out="Normal completion" proc_out_comp="Normal completion" echo 'proc_out:'$proc_out echo 'proc_out_comp:'$proc_out_comp if then echo 'match' else echo 'no_match' fi ~ ~ ~ ~ ~ ~ ~ ~ ~ (4 Replies)
Discussion started by: cartrider
4 Replies

8. UNIX and Linux Applications

How to make ldappasswd use {SHA} instead of {SSHA} for users passwords in openldap?

Is it possible to use {SHA} with ldappasswd? I didn't find responsible option in manual page and doc (1 Reply)
Discussion started by: urello
1 Replies

9. AIX

SHA-256-Base 64 Encryption

Hello Guys, I was trying to have an SHA256 encryption which further be encrypted into base 64 using AIX unix command shasum -a 256. What I found in this is my output is different than a website: "online-convertcom" Actually conversion from website is exactly matching my requirements but... (4 Replies)
Discussion started by: Krunal Patel
4 Replies

10. UNIX for Beginners Questions & Answers

If statement to compare two strings

Hi, I am trying to do the following to see if "ip" is already present in a file. if ; then echo "hi" else echo "hello" fi I am seeing errors on the if statement. Can someone please correct the syntax for me? Thanks (2 Replies)
Discussion started by: waince
2 Replies
DNSSEC-DSFROMKEY(8)						       BIND9						       DNSSEC-DSFROMKEY(8)

NAME
dnssec-dsfromkey - DNSSEC DS RR generation tool SYNOPSIS
dnssec-dsfromkey [-v level] [-1] [-2] [-a alg] [-l domain] [-T TTL] {keyfile} dnssec-dsfromkey {-s} [-1] [-2] [-a alg] [-K directory] [-l domain] [-s] [-c class] [-T TTL] [-f file] [-A] [-v level] {dnsname} DESCRIPTION
dnssec-dsfromkey outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s). OPTIONS
-1 Use SHA-1 as the digest algorithm (the default is to use both SHA-1 and SHA-256). -2 Use SHA-256 as the digest algorithm. -a algorithm Select the digest algorithm. The value of algorithm must be one of SHA-1 (SHA1), SHA-256 (SHA256), GOST or SHA-384 (SHA384). These values are case insensitive. -T TTL Specifies the TTL of the DS records. -K directory Look for key files (or, in keyset mode, keyset- files) in directory. -f file Zone file mode: in place of the keyfile name, the argument is the DNS domain name of a zone master file, which can be read from file. If the zone name is the same as file, then it may be omitted. If file is set to "-", then the zone data is read from the standard input. This makes it possible to use the output of the dig command as input, as in: dig dnskey example.com | dnssec-dsfromkey -f - example.com -A Include ZSK's when generating DS records. Without this option, only keys which have the KSK flag set will be converted to DS records and printed. Useful only in zone file mode. -l domain Generate a DLV set instead of a DS set. The specified domain is appended to the name for each record in the set. The DNSSEC Lookaside Validation (DLV) RR is described in RFC 4431. -s Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file. -c class Specifies the DNS class (default is IN). Useful only in keyset or zone file mode. -v level Sets the debugging level. EXAMPLE
To build the SHA-256 DS RR from the Kexample.com.+003+26160 keyfile name, the following command would be issued: dnssec-dsfromkey -2 Kexample.com.+003+26160 The command would print something like: example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94 FILES
The keyfile can be designed by the key identification Knnnn.+aaa+iiiii or the full file name Knnnn.+aaa+iiiii.key as generated by dnssec-keygen(8). The keyset file name is built from the directory, the string keyset- and the dnsname. CAVEAT
A keyfile error can give a "file not found" even if the file exists. SEE ALSO
dnssec-keygen(8), dnssec-signzone(8), BIND 9 Administrator Reference Manual, RFC 3658, RFC 4431. RFC 4509. AUTHOR
Internet Systems Consortium COPYRIGHT
Copyright (C) 2008-2012 Internet Systems Consortium, Inc. ("ISC") BIND9 August 26, 2009 DNSSEC-DSFROMKEY(8)
All times are GMT -4. The time now is 07:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy