10-14-2013
hi, thx for your answer, that function look like somo C code, and i dont know how implent it, can you give me a example pls. and other aswer that function works on every unix system?.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
2. Shell Programming and Scripting
Dear All,
I have a requirement in which i have to load a file placed in FTP location onto my database. The process i'll follow is as below:
1) Get the files using FTP.
2) Create the desired load files as i have to load only 19 fields out of the 104 available in the file.
The fields i require... (7 Replies)
Discussion started by: abhishekakaomi
7 Replies
3. Shell Programming and Scripting
Dears,
i want cut the lines from a log file. Example of the log file as follows..
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMDeliverContrUtil isDeliverSM
FINE:
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMUtil addSysUpMsgLog
INFO: . The message content... (1 Reply)
Discussion started by: tonypalokkaran
1 Replies
4. Shell Programming and Scripting
Hi,
I am working on one script..I am having files in the below format
file 1 (each line is separated with : delimeter)
SPLASH:SPLASH:SVN
CIB/MCH:MCH:SVN
Now I want from file 1 that most left part of the first line will store in... (6 Replies)
Discussion started by: rohit22hamirpur
6 Replies
5. Shell Programming and Scripting
Hi,
First of all sincere apologies if I have posted in a wrong section ! Please correct me if I am wrong !
I am very new to UNIX scripting.
Currently my problem is that I have a code file at the location /home/usr/workarea/GeneratedLogs.log :-
Code :-
(Feb 7, 571 7:07:29 AM),... (4 Replies)
Discussion started by: acidburn_007
4 Replies
6. Shell Programming and Scripting
Hello ppl
I have a requirement to split (cut in unix) a file (A.txt) which is a pipe delimited file into A1.txt and A2.txt
Now I have to join (paste in unix) this A2.txt with external file A3.txt to form
output file A4.txt which should be CSV (comma separated file) so that third party can... (25 Replies)
Discussion started by: etldev
25 Replies
7. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
8. Shell Programming and Scripting
I am using : << cut / cut to comment out block of code.
Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines.
The "warning " is at last line of script.
done < results
169 echo "END read all positioning parameters"
170... (8 Replies)
Discussion started by: annacreek
8 Replies
LEARN ABOUT OPENSOLARIS
upscli_list_next
UPSCLI_LIST_NEXT(3) NUT Manual UPSCLI_LIST_NEXT(3)
NAME
upscli_list_next - retrieve list items from a UPS
SYNOPSIS
#include <upsclient.h>
int upscli_list_next(UPSCONN_t *ups, int numq, const char **query,
int *numa, char ***answer)
DESCRIPTION
The upscli_list_next() function takes the pointer ups to a UPSCONN_t state structure, and the pointer query to an array of numq query
elements. It performs a read from the network and expects to find either another list item or the end of a list.
You must call upscli_list_start(3) before calling this function.
This function will return 1 and set values in numa and answer if a list item is received. If the list is done, it will return 0, and the
values in numa and answer are undefined.
Calling this function after it returns something other than 1 is undefined.
QUERY FORMATTING
You may not change the values of numq or query between the call to upscli_list_start(3) and the first call to this function. You also may
not change the values between calls to this function.
ANSWER FORMATTING
The contents of numa and answer work just like a call to upscli_get(3). The values returned by upsd(8) are identical to a single item
request, so this is not surprising.
ERROR CHECKING
This function checks the response from upsd(8) against your query. If the response is not part of the list you have requested, it will
return an error code.
When this happens, upscli_upserror(3) will return UPSCLI_ERR_PROTOCOL.
RETURN VALUE
The upscli_list_next() function returns 1 when list data is present, 0 if the list is finished, or -1 if an error occurs.
It is possible to have an empty list. The function will return 0 for its first call in that case.
SEE ALSO
upscli_list_start(3), upscli_strerror(3), upscli_upserror(3)
Network UPS Tools 05/22/2012 UPSCLI_LIST_NEXT(3)