Hi all,
I am new to awk programs.I have a file like this
vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd
vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd
vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd
vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd... (3 Replies)
How will i convert a file
<LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT>
<LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT>... (8 Replies)
Hi all,
Here is my problem. I want to read data from a file and pass the variable to a select query.
I tried but it doesn't seem to work. Please advise. Example below.
FileName='filekey.txt'
while read LINE
do
var=$LINE
print "For File key $var"
${ORACLE_HOME}/bin/sqlplus -s... (1 Reply)
Hi ,
I just found you while surfing for the string
'Redirecting sql select query output from within a shell script to txt file/excel file'
Could you find time sending me the code for the above question?
It'll be great help for me.
I have a perl file that calls the sql file... (1 Reply)
Hi Yogesh,
Lucky that i caught you online. Yeah i read about DBI and the WriteExcel module. But the server is not supporting these modules. It said..."Cannot locate DBI"..."Cannot locate Spreadsheet::WriteExcel"
I tried creating a simple text file to get the query output, but the... (1 Reply)
All,
Below is the file, what i need to do is take the text in between the /*-- and --*/ , i mean the jobs. Then i have grep for system name . If the job is there in system 1 i have to print to a file.
Basically i want to take all the jobs that are in system1 to another file . because... (7 Replies)
So, I would like to run differen select queries on multiple databases..
I made a script wich I thought to be called something like..
./script.sh sql_file_name out.log
or to enter select statement in a command line..
(aix)
and I did created some shell script wich is not working..
it... (6 Replies)
Hello,
I've been searching and reading, but I can't figure out how to solve this problem with my newbie skills.
In my directory, I have a list of files (see dirlist.txt attachment) that I need to merge and rename. I have part of the code of the code figured out (see below). However, I... (3 Replies)
Hi
I need to select lines from a txt file, I have got a line starting with ZMIO:MSISDN= and after a few line I have another line starting with 'MOBILE STATION ISDN NUMBER' and another one starting with 'VLR-ADDRESS' I need to copy these three lines as three different columns in a separate... (3 Replies)
Hi All,
I need to remove all files except the most update data based on date on filename
Input
data_AIDS_20150312.txt
data_AIDS_20150311.txt
data_AIDS_20150411.txt
data_AIDS_20140312.txt
the most updated data is data_AIDS_20150411.txt, so I'll remove other files. My expected output... (3 Replies)
Discussion started by: radius
3 Replies
LEARN ABOUT DEBIAN
librrd
librrd(3) rrdtool librrd(3)NAME
librrd - RRD library functions
DESCRIPTION
librrd contains most of the functionality in RRDTool. The command line utilities and language bindings are often just wrappers around the
code contained in librrd.
This manual page documents the librrd API.
NOTE: This document is a work in progress, and should be considered incomplete as long as this warning persists. For more information
about the librrd functions, always consult the source code.
CORE FUNCTIONS
rrd_dump_cb_r(char *filename, int opt_header, rrd_output_callback_t cb, void *user)
In some situations it is necessary to get the output of "rrd_dump" without writing it to a file or the standard output. In such cases
an application can ask rrd_dump_cb_r to call an user-defined function each time there is output to be stored somewhere. This can be
used, to e.g. directly feed an XML parser with the dumped output or transfer the resulting string in memory.
The arguments for rrd_dump_cb_r are the same as for rrd_dump_opt_r except that the output filename parameter is replaced by the user-
defined callback function and an additional parameter for the callback function that is passed untouched, i.e. to store information
about the callback state needed for the user-defined callback to function properly.
Recent versions of rrd_dump_opt_r internally use this callback mechanism to write their output to the file provided by the user.
size_t rrd_dump_opt_cb_fileout(
const void *data,
size_t len,
void *user)
{
return fwrite(data, 1, len, (FILE *)user);
}
The associated call for rrd_dump_cb_r looks like
res = rrd_dump_cb_r(filename, opt_header,
rrd_dump_opt_cb_fileout, (void *)out_file);
where the last parameter specifies the file handle rrd_dump_opt_cb_fileout should write to. There's no specific condition for the
callback to detect when it is called for the first time, nor for the last time. If you require this for initialization and cleanup you
should do those tasks before and after calling rrd_dump_cr_r respectively.
UTILITY FUNCTIONS
rrd_random()
Generates random numbers just like random(). This further ensures that the random number generator is seeded exactly once per process.
rrd_add_ptr(void ***dest, size_t *dest_size, void *src)
Dynamically resize the array pointed to by "dest". "dest_size" is a pointer to the current size of "dest". Upon successful realloc(),
the "dest_size" is incremented by 1 and the "src" pointer is stored at the end of the new "dest". Returns 1 on success, 0 on failure.
type **arr = NULL;
type *elem = "whatever";
size_t arr_size = 0;
if (!rrd_add_ptr(&arr, &arr_size, elem))
handle_failure();
rrd_add_strdup(char ***dest, size_t *dest_size, char *src)
Like "rrd_add_ptr", except adds a "strdup" of the source string.
char **arr = NULL;
size_t arr_size = NULL;
char *str = "example text";
if (!rrd_add_strdup(&arr, &arr_size, str))
handle_failure();
rrd_free_ptrs(void ***src, size_t *cnt)
Free an array of pointers allocated by "rrd_add_ptr" or "rrd_add_strdup". Also frees the array pointer itself. On return, the source
pointer will be NULL and the count will be zero.
/* created as above */
rrd_free_ptrs(&arr, &arr_size);
/* here, arr == NULL && arr_size == 0 */
rrd_mkdir_p(const char *pathname, mode_t mode)
Create the directory named "pathname" including all of its parent directories (similar to "mkdir -p" on the command line - see mkdir(1)
for more information). The argument "mode" specifies the permissions to use. It is modified by the process's "umask". See mkdir(2) for
more details.
The function returns 0 on success, a negative value else. In case of an error, "errno" is set accordingly. Aside from the errors
documented in mkdir(2), the function may fail with the following errors:
EINVAL
"pathname" is "NULL" or the empty string.
ENOMEM
Insufficient memory was available.
any error returned by stat(2)
In contrast to mkdir(2), the function does not fail if "pathname" already exists and is a directory.
AUTHOR
RRD Contributors <rrd-developers@lists.oetiker.ch>
1.4.7 2009-11-15 librrd(3)