11-15-2010
Thank you so very much everybody.
All the codes suggested by ctsgnb are working flawlessly. Great work!
I tested the two codes by danmero and Franklin52 and nothing is changed in my file. I got no error but it just returned the original file back to me.
I have not tested the code by DGPickett yet. I am a newbie and I need more time to figure out what should I do with these lines! I will surely test it later today.
You guys are awesome. Thanks again!
Last edited by GoldenFire; 11-15-2010 at 05:31 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Could anybody help me.
I need to create a script that reads a text file from STDIN and prints out the file to STDOUT with line numbers at the beginning of each line.
Thanks. (5 Replies)
Discussion started by: mascorro
5 Replies
2. Shell Programming and Scripting
Hi
I am trying to get the value of several results in a file called seq032.diag.
The values I am looking for is down under Smooth Tracking nodes and is for g01r01 g02r01 s01t02 etc etc. The problem is that when I try to use look for text and tail etc, it works fine in one result file. In... (1 Reply)
Discussion started by: Navigatorchief
1 Replies
3. Shell Programming and Scripting
Hi All,
I have a doubt.
Can we assign a regular expression for pattern searching to a variable in a script and then use that variable in place of a regular expression in sed command.I tried but got some syntax error!!Is it not possible.Because my requirement is that i have a generic script to get... (8 Replies)
Discussion started by: usha rao
8 Replies
4. Shell Programming and Scripting
hi My requirement is this:
I have a file having around 100000 records pipe delimited. Now I want to compare record 1 with record 2 and similarly record3 with record 4, this goes on.. For this purpose i put a script as follows:
#!bin/ksh
ct_line=1
nxt_line=`expr ${ct_line} + 1`
awk -F "|"... (1 Reply)
Discussion started by: ramkrix
1 Replies
5. Shell Programming and Scripting
How can I delete spaces at the begining of all lines of my file ? (2 Replies)
Discussion started by: Sara_84
2 Replies
6. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
3 Replies
7. UNIX for Dummies Questions & Answers
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies
8. Shell Programming and Scripting
I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc. Ie only comment the line starting with exclude.
File contents.
exclude
exclude=
hi I am excluded
excludes
excludes=
... (9 Replies)
Discussion started by: anil510
9 Replies
9. Shell Programming and Scripting
Hi
from a script i want to to read a file beginning at line e.g. number 21 to the EOF.
less +n21 temp.txt
Bevor the result, it brings an empty page, so that i cant use for scripting.
Any idea how the problem can be solved?
Thanks in advance!
IMPe (2 Replies)
Discussion started by: IMPe
2 Replies
10. Red Hat
Hello All,
I have a text file which gets uploaded to tables using shells script. However before running that script I need to alter it, like in the below I have to firstly find the word 1234 and remove the new line from end of it.
1234,5678,fasfasasfsadf
abc
changes to... (11 Replies)
Discussion started by: Sandeep_sandy
11 Replies
LEARN ABOUT REDHAT
dsa_generate_parameters
DSA_generate_parameters(3) OpenSSL DSA_generate_parameters(3)
NAME
DSA_generate_parameters - generate DSA parameters
SYNOPSIS
#include <openssl/dsa.h>
DSA *DSA_generate_parameters(int bits, unsigned char *seed,
int seed_len, int *counter_ret, unsigned long *h_ret,
void (*callback)(int, int, void *), void *cb_arg);
DESCRIPTION
DSA_generate_parameters() generates primes p and q and a generator g for use in the DSA.
bits is the length of the prime to be generated; the DSS allows a maximum of 1024 bits.
If seed is NULL or seed_len < 20, the primes will be generated at random. Otherwise, the seed is used to generate them. If the given seed
does not yield a prime q, a new random seed is chosen and placed at seed.
DSA_generate_parameters() places the iteration count in *counter_ret and a counter used for finding a generator in *h_ret, unless these are
NULL.
A callback function may be used to provide feedback about the progress of the key generation. If callback is not NULL, it will be called as
follows:
o When a candidate for q is generated, callback(0, m++, cb_arg) is called (m is 0 for the first candidate).
o When a candidate for q has passed a test by trial division, callback(1, -1, cb_arg) is called. While a candidate for q is tested by
Miller-Rabin primality tests, callback(1, i, cb_arg) is called in the outer loop (once for each witness that confirms that the candi-
date may be prime); i is the loop counter (starting at 0).
o When a prime q has been found, callback(2, 0, cb_arg) and callback(3, 0, cb_arg) are called.
o Before a candidate for p (other than the first) is generated and tested, callback(0, counter, cb_arg) is called.
o When a candidate for p has passed the test by trial division, callback(1, -1, cb_arg) is called. While it is tested by the Miller-
Rabin primality test, callback(1, i, cb_arg) is called in the outer loop (once for each witness that confirms that the candidate may be
prime). i is the loop counter (starting at 0).
o When p has been found, callback(2, 1, cb_arg) is called.
o When the generator has been found, callback(3, 1, cb_arg) is called.
RETURN VALUE
DSA_generate_parameters() returns a pointer to the DSA structure, or NULL if the parameter generation fails. The error codes can be
obtained by ERR_get_error(3).
BUGS
Seed lengths > 20 are not supported.
SEE ALSO
dsa(3), ERR_get_error(3), rand(3), DSA_free(3)
HISTORY
DSA_generate_parameters() appeared in SSLeay 0.8. The cb_arg argument was added in SSLeay 0.9.0. In versions up to OpenSSL 0.9.4, call-
back(1, ...) was called in the inner loop of the Miller-Rabin test whenever it reached the squaring step (the parameters to callback did
not reveal how many witnesses had been tested); since OpenSSL 0.9.5, callback(1, ...) is called as in BN_is_prime(3), i.e. once for each
witness. =cut
0.9.7a 2002-09-25 DSA_generate_parameters(3)