Hi Folks,
I have a file with all fields defined by byte position, but any field can be empty so I cannot print lines based on a search of specific columns. I need to print all lines of this file where the string of two characters at byte position 100-101 contains the number 27. Any ideas?
... (4 Replies)
Hi,
I have to find a text in a variable and need to get the position of it. say,
a="This is Example Example1 xxx yyy Example"
if i search for "Example" then i should get the location of the starting location "Example".
and in next iteration it should give the location of next "Example"
... (2 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies
LEARN ABOUT CENTOS
libssh2_session_init_ex
libssh2_session_init_ex(3) libssh2 manual libssh2_session_init_ex(3)NAME
libssh2_session_init_ex - initializes an SSH session object
SYNOPSIS
#include <libssh2.h>
LIBSSH2_SESSION * libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*myalloc)), LIBSSH2_FREE_FUNC((*myfree)), LIBSSH2_REALLOC_FUNC((*myrealloc)),
void *abstract);
LIBSSH2_SESSION * libssh2_session_init(void);
DESCRIPTION
myalloc - Custom allocator function. Refer to the section on Callbacks for implementing an allocator callback. Pass a value of NULL to use
the default system allocator.
myfree - Custom de-allocator function. Refer to the section on Callbacks for implementing a deallocator callback. Pass a value of NULL to
use the default system deallocator.
myrealloc - Custom re-allocator function. Refer to the section on Callbacks for implementing a reallocator callback. Pass a value of NULL
to use the default system reallocator.
abstract - Arbitrary pointer to application specific callback data. This value will be passed to any callback function associated with the
named session instance.
Initializes an SSH session object. By default system memory allocators (malloc(), free(), realloc()) will be used for any dynamically allo-
cated memory blocks. Alternate memory allocation functions may be specified using the extended version of this API call, and/or optional
application specific data may be attached to the session object.
This method must be called first, prior to configuring session options or starting up an SSH session with a remote server.
RETURN VALUE
Pointer to a newly allocated LIBSSH2_SESSION instance, or NULL on errors.
SEE ALSO libssh2_session_free(3)libssh2_session_handshake(3)libssh2 0.15 1 Jun 2007 libssh2_session_init_ex(3)