I want to select the first column from a daily file called foo.csv. The result is written to file foo.txt. Currently the following script is used for that:
cut -d, -f 1 foo.csv > foo.txt
A typical result would yield :
A12
A45
B11
B67
What needs to happen in addition is that two columns... (5 Replies)
Hi everybody,
I've got two simples file1 like:
aaa aaa aaa
bbb bbb bbb
ccc ccc ccc
and file2 like:
111 111 111
222 222 222
333 333 333
I need to:
1) add a line say "new line" as the first line of the file
2)add a column from file2 (say column3) to file1; the new column should... (14 Replies)
Hi I am trying to write a bash script to add a line of text to the middle of a file.
The way I worked it out was to calculate the number of lines and divide by 2. The file I am using is called newfile and it just contains lines of data.
The new file I have created I have called midfile and... (7 Replies)
Good afternoon to everyone,
I have some input and output from various widgets that I am trying to get to play nicely together. Basically I would like to stay out of excel and be able to automate the entire process. I have read some posts here about how to use awk, nawk, etc, to do similar... (9 Replies)
Hi All ,
Kindly help me with this soln
awk '{printf "%s %7s \n", $1,$c}' infile
where
value of variable c I am externally giving input
But executing the above command shows all the columns of infile where as I want only 1st column of infile and 2nd column should print value c (8 Replies)
Hello,
I have a file with several lines and I need to trim and pad with spaces the data that are between position 6 and 15 included. Data in position 1 to 5 and after 15 could be anything, and should stay as they are.
For instance, the following records in a file (underscore = space)... (4 Replies)
I have a file in which I need to add more columns to based on a key in the first file:
File1
key1,abc,123,
key2,def,456,
key3,ghi,789,
File2
key2,zyx,111,qqq,
key3,yuu,222,www,
key1,pui,333,eee,
key4,xxx,999,rrr,
I would like to create the following output:
Output (1 Reply)
Hi,
I have a tab delimited text file with three columns:
Input:
1 25734 25737
1 32719 32724
1 59339 59342
1 59512 59513
1 621740 621745
For each row of the text file I want to print out all the values between the second and third columns, including them. The... (3 Replies)
Hi ,
I need to add few new columns in existing file .Any help would be great
ex:
existing file
name,typ,add,dept
New file(com1,sal are new)
name,com1,type,sal,add,dept
Thanks,
mohan (1 Reply)
Discussion started by: mohan705
1 Replies
LEARN ABOUT CENTOS
mail::dkim::privatekey
Mail::DKIM::PrivateKey(3) User Contributed Perl Documentation Mail::DKIM::PrivateKey(3)NAME
Mail::DKIM::PrivateKey - a private key loaded in memory for DKIM signing
SYNOPSIS
my $key1 = Mail::DKIM::PrivateKey->load(
File => "/path/to/private.key");
my $key2 = Mail::DKIM::PrivateKey->load(
Data => $base64);
# use the loaded key in a DKIM signing object
my $dkim = Mail::DKIM::Signer->new(
Key => $key2,
);
CONSTRUCTOR
load() - loads a private key into memory
my $key1 = Mail::DKIM::PrivateKey->load(
File => "/path/to/private.key");
Loads the Base64-encoded key from the specified file.
my $key2 = Mail::DKIM::PrivateKey->load(Data => $base64);
Loads the Base64-encoded key from a string already in memory.
my $key3 = Mail::DKIM::PrivateKey->load(Cork => $openssl_object);
Creates a Mail::DKIM::PrivateKey wrapper object for the given OpenSSL key object. The key object should be of type Crypt::OpenSSL::RSA.
METHODS
cork() - access the underlying OpenSSL key object
$openssl_object = $key->cork;
The returned object is of type Crypt::OpenSSL::RSA.
sign_digest()
Cryptographically sign the given message digest.
$key->sign_digest("SHA-1", sha1("my message text"));
The first parameter is the name of the digest: one of "SHA-1", "SHA-256".
The second parameter is the message digest as a binary string.
The result should be the signed digest as a binary string.
AUTHOR
Jason Long, <jlong@messiah.edu>
COPYRIGHT AND LICENSE
Copyright (C) 2006-2008 by Messiah College
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or,
at your option, any later version of Perl 5 you may have available.
perl v5.16.3 2010-11-14 Mail::DKIM::PrivateKey(3)