awk -v FS='>' '{
# Get stuff after second >, and convert it all to uppercase
$0=toupper($3);
# Substitute every non-alpha char with space
gsub(/[^A-Z]/, " ");
# Split on spaces, into array A
split($0, A, " ");
# count words
for(key in A) count[A[key]]++;
}
END {
# print words
for(key in count)
printf("%s\t%d\n", key, count[key]);
}' < filename
1 . Thanks everyone who read the post first.
2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too.
How to view it ?
If I want to view 200-300 ,how can I implement it
3 . Thanks (3 Replies)
Hi,
I am trying to send oracle archives over WAN and it is taking hell a lot of time. To reduce the time, I tried to gzip the files and send over to the other side. That seems to reduce the time. Does anybody have experienced this kind of problem and any possible ways to reduce the time.
... (1 Reply)
I have a big text file. I want to cut it into 2 pieces at known point or I know the pattern of the contents from where it can separate the files. Is there any quick command/solution? (4 Replies)
I found some ascii art that is animated (vt100) and would like to view it properly. However, when I try using 'cat', the file is done almost the instant I press enter. How can I view the file in a slower fashion (similar to the days of 2400baud, for example)? (2 Replies)
Hi All,
I need some help to effectively parse out a subset of results from a big results file.
Below is an example of the text file. Each block that I need to parse starts with "reading sequence file 10.codon" (next block starts with another number) and ends with **p-Value(s)**. I have given... (1 Reply)
HI Experts ,
I'm using the following code to remove spaces appearing at the end of the file.
sed "s/*$//g" <filename> > <new_filename>
mv <new_filename> <filename>
this is working fine for volumes upto 20-25 GB.
for the bigger files it is taking more time that it is required... (5 Replies)
I am looking for a tabbed text editor without a big library like gnome, kde, and gtk, I know about gedit, kate with extensions, geany, and bluefish. I would prefer it to be like gedit and be really light weight. So if anyone knows of a text editor that doesn't require those big libraries please let... (3 Replies)
Gents,
Please can u help me to improve this script to be more faster, it works perfectly but for big files take a lot time to end the job..
I see the problem is in the step (while) and in this part the script takes a lot time..
Please if you can find a best way to do will be great.
... (13 Replies)
Discussion started by: jiam912
13 Replies
LEARN ABOUT PLAN9
evp_bytestokey
EVP_BytesToKey(3SSL) OpenSSL EVP_BytesToKey(3SSL)NAME
EVP_BytesToKey - password based encryption routine
SYNOPSIS
#include <openssl/evp.h>
int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
const unsigned char *salt,
const unsigned char *data, int datal, int count,
unsigned char *key,unsigned char *iv);
DESCRIPTION
EVP_BytesToKey() derives a key and IV from various parameters. type is the cipher to derive the key and IV for. md is the message digest to
use. The salt parameter is used as a salt in the derivation: it should point to an 8 byte buffer or NULL if no salt is used. data is a
buffer containing datal bytes which is used to derive the keying data. count is the iteration count to use. The derived key and IV will be
written to key and iv respectively.
NOTES
A typical application of this function is to derive keying material for an encryption algorithm from a password in the data parameter.
Increasing the count parameter slows down the algorithm which makes it harder for an attacker to peform a brute force attack using a large
number of candidate passwords.
If the total key and IV length is less than the digest length and MD5 is used then the derivation algorithm is compatible with PKCS#5 v1.5
otherwise a non standard extension is used to derive the extra data.
Newer applications should use more standard algorithms such as PKCS#5 v2.0 for key derivation.
KEY DERIVATION ALGORITHM
The key and IV is derived by concatenating D_1, D_2, etc until enough data is available for the key and IV. D_i is defined as:
D_i = HASH^count(D_(i-1) || data || salt)
where || denotes concatentaion, D_0 is empty, HASH is the digest algorithm in use, HASH^1(data) is simply HASH(data), HASH^2(data) is
HASH(HASH(data)) and so on.
The initial bytes are used for the key and the subsequent bytes for the IV.
RETURN VALUES
EVP_BytesToKey() returns the size of the derived key in bytes.
SEE ALSO evp(3), rand(3), EVP_EncryptInit(3)HISTORY 1.0.1e 2014-08-06 EVP_BytesToKey(3SSL)