03-14-2011
Thanks for your help. Your solution didn't work for some reason - it messed up something that meant everything reassembled completely out of order. I have a feeling there may have been some irregularities in my data after all.. Anyway, I managed to bodge together a fix in C so it's all good
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am an Awk newbie and cannot wrap my brain around my problem:
Given multi-line records of varying lengths separated by a blank line I need to skip the first two lines
of every record and extract every-other line in each record unless the first line of the record has the word "(CONT)" in the... (10 Replies)
Discussion started by: RacerX
10 Replies
2. Shell Programming and Scripting
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
3. UNIX for Dummies Questions & Answers
How can I list the file under current directory both in alphabetical and in reverse alphabetical order? (1 Reply)
Discussion started by: g.ashok
1 Replies
4. Shell Programming and Scripting
Some records in a file look like this, with any number of lines between start and end flags:
/Start
Some stuff
Banana 1
Some more stuff
End/
/Start
Some stuff
End/
/Start
Some stuff
Some more stuff
Banana 2
End/
...how would I process this file to find records containing the... (8 Replies)
Discussion started by: cs03dmj
8 Replies
5. Shell Programming and Scripting
Now that I've parsed out the data that I desire I'm left with variable length multi-line records that are field seperated by new lines (\n) and record seperated by a single empty line ("")
At first I was considering doing something like this to append all of the record rows into a single row:
... (4 Replies)
Discussion started by: daveyabe
4 Replies
6. Shell Programming and Scripting
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies
7. Shell Programming and Scripting
Hi,
I have a file like mentioned below..For each specific id starting with > I want to join the sequence in multiple lines to a single line..Is there a simple way in awk or sed to do this
>ENST00000558922 cdna:KNOWN
TCCAGGATCCAGCCTCCCGATCACCGCGCTAGTCCTCGCCCTGCCTGGGCTTCCCCAGAG... (2 Replies)
Discussion started by: Diya123
2 Replies
8. Shell Programming and Scripting
Hi All,
I have one file containing thousands of table names in single column. Now I want that file split into multiple files e.g one file containing table names starting from A, other containing all tables starting from B...and so on..till Z.
I tried below but it did not work.
for i in... (6 Replies)
Discussion started by: shekhar_4_u
6 Replies
9. Shell Programming and Scripting
Input File:
>Seq1
ASDADAFASFASFADGSDGFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSD
>Seq2
SDASDAQEQWEQeqAdfaasd
>Seq3
ASDSALGHIUDFJANCAGPATHLACJHPAUTYNJKG
......
Desired Output File
>Seq1
ASDADAFASF
ASFADGSDGF
SDFSDFSDFS
DFSDFSDFSD
FSDFSDFSDF
SD
>Seq2 (4 Replies)
Discussion started by: patrick87
4 Replies
10. Shell Programming and Scripting
I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line
Source file
07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
LEARN ABOUT CENTOS
rsa_check_key
RSA_check_key(3) OpenSSL RSA_check_key(3)
NAME
RSA_check_key - validate private RSA keys
SYNOPSIS
#include <openssl/rsa.h>
int RSA_check_key(RSA *rsa);
DESCRIPTION
This function validates RSA keys. It checks that p and q are in fact prime, and that n = p*q.
It also checks that d*e = 1 mod (p-1*q-1), and that dmp1, dmq1 and iqmp are set correctly or are NULL.
As such, this function can not be used with any arbitrary RSA key object, even if it is otherwise fit for regular RSA operation. See NOTES
for more information.
RETURN VALUE
RSA_check_key() returns 1 if rsa is a valid RSA key, and 0 otherwise. -1 is returned if an error occurs while checking the key.
If the key is invalid or an error occurred, the reason code can be obtained using ERR_get_error(3).
NOTES
This function does not work on RSA public keys that have only the modulus and public exponent elements populated. It performs integrity
checks on all the RSA key material, so the RSA key structure must contain all the private key data too.
Unlike most other RSA functions, this function does not work transparently with any underlying ENGINE implementation because it uses the
key data in the RSA structure directly. An ENGINE implementation can override the way key data is stored and handled, and can even provide
support for HSM keys - in which case the RSA structure may contain no key data at all! If the ENGINE in question is only being used for
acceleration or analysis purposes, then in all likelihood the RSA key data is complete and untouched, but this can't be assumed in the
general case.
BUGS
A method of verifying the RSA key using opaque RSA API functions might need to be considered. Right now RSA_check_key() simply uses the RSA
structure elements directly, bypassing the RSA_METHOD table altogether (and completely violating encapsulation and object-orientation in
the process). The best fix will probably be to introduce a "check_key()" handler to the RSA_METHOD function table so that alternative
implementations can also provide their own verifiers.
SEE ALSO
rsa(3), ERR_get_error(3)
HISTORY
RSA_check_key() appeared in OpenSSL 0.9.4.
1.0.1e 2013-02-11 RSA_check_key(3)