@Corona: Any particular reason why you chose to use buffer of size 4096?
Not really. 4096 is just a "nice round number" in computing terms, a power of two, and plenty long enough for most text lines. 'most' may not mean yours, adjust to taste. Anything under a couple of megs in size will work. If you need really large buffers you have to make them with malloc:
You use buf the same way as you would a stack var like char buf[64]; since an array and a pointer amount to the same thing in the end, as far as the processor's concerned -- a starting point in memory.
These 2 Users Gave Thanks to Corona688 For This Post:
I'm still beginner and maybe someone can help me.
I have this input:
the great warrior a, b, c
and what i want to know is, with awk, how can i detect the string with 'warrior' string on it and print the a, b, and c seperately, become like this :
Warrior Type
a
b
c
Im still very... (3 Replies)
Hi,
I am writing a shell script to parse some files, and gather data.
The data in the files is displayed as below.
.......xyz: abz: ......qrt: ....
.......xyz: abz: ......qrt: ...
I have tried using awk and cut, but the position of these values keep changing, so I wasn't able to get... (2 Replies)
how to use "awk" to print any record has pattern not equal ? for example my file has 5 records & I need to get all lines which $1=10 or 20 , $2=10 or 20 and $3 greater than "130302" as it shown :
10 20 1303252348212B030
20 10 1303242348212B030
40 34 1303252348212B030
10 20 ... (14 Replies)
I have
2013-06-11 23:55:14 1Umexd-0004cm-IG <= user@domain.com
I need sed/awk operation on this, so that it should print the very next pattern only after the the pattern mach <=
ie only print user@domain.com (7 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
I have input file as below I need to check for a pattern and if it is there in file then I need to print all the lines below BEGIN and END keyword. Could you please help me how to get this in AIX using sed or awk.
Input file:
ABC
******** BEGIN *****
My name is Amit.
I am learning unix.... (8 Replies)
Take example of below file.
abc.txt
nas1:/abc/test/test1 /test
nas1:/abc/test/test1/test2 /test/abc
nas1:/abc/test/
Now i have a variable that contains "nas1:/abc/test/test1" value , so i need to search the above file for this variable and print only this line.
... (14 Replies)
Discussion started by: mohit_vardhani
14 Replies
LEARN ABOUT REDHAT
err_lib_error_string
ERR_error_string(3) OpenSSL ERR_error_string(3)NAME
ERR_error_string, ERR_error_string_n, ERR_lib_error_string, ERR_func_error_string, ERR_reason_error_string - obtain human-readable error
message
SYNOPSIS
#include <openssl/err.h>
char *ERR_error_string(unsigned long e, char *buf);
char *ERR_error_string_n(unsigned long e, char *buf, size_t len);
const char *ERR_lib_error_string(unsigned long e);
const char *ERR_func_error_string(unsigned long e);
const char *ERR_reason_error_string(unsigned long e);
DESCRIPTION
ERR_error_string() generates a human-readable string representing the error code e, and places it at buf. buf must be at least 120 bytes
long. If buf is NULL, the error string is placed in a static buffer. ERR_error_string_n() is a variant of ERR_error_string() that writes
at most len characters (including the terminating 0) and truncates the string if necessary. For ERR_error_string_n(), buf may not be NULL.
The string will have the following format:
error:[error code]:[library name]:[function name]:[reason string]
error code is an 8 digit hexadecimal number, library name, function name and reason string are ASCII text.
ERR_lib_error_string(), ERR_func_error_string() and ERR_reason_error_string() return the library name, function name and reason string
respectively.
The OpenSSL error strings should be loaded by calling ERR_load_crypto_strings(3) or, for SSL applications, SSL_load_error_strings(3) first.
If there is no text string registered for the given error code, the error string will contain the numeric code.
ERR_print_errors(3) can be used to print all error codes currently in the queue.
RETURN VALUES
ERR_error_string() returns a pointer to a static buffer containing the string if buf == NULL, buf otherwise.
ERR_lib_error_string(), ERR_func_error_string() and ERR_reason_error_string() return the strings, and NULL if none is registered for the
error code.
SEE ALSO err(3), ERR_get_error(3), ERR_load_crypto_strings(3), SSL_load_error_strings(3)ERR_print_errors(3)HISTORY
ERR_error_string() is available in all versions of SSLeay and OpenSSL. ERR_error_string_n() was added in OpenSSL 0.9.6.
0.9.7a 2000-09-14 ERR_error_string(3)