08-28-2009
Your code did work.
Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
in a korn shell script, has anyone ever seen an 'exit' being treated as a 'break 2'? I have a script which has 3 nested loops. Within the inner most loop, i'm trying to exit the script on a fault condition. instead of exiting, it's acting as a 'break 2' and then continuing on with the... (4 Replies)
Discussion started by: gsatch
4 Replies
2. IP Networking
i am writing a client and server program
client program
main()
{
int sockfd,n;
char str;
struct sockaddr_in sock;
if ((sockfd=socket(AF_INET,SOCK_STREAM,0))<0)
{
perror("SOCKET ERROR");
}
bzero(&sock,sizeof(sock));
sock.sin_family=AF_INET; (1 Reply)
Discussion started by: ramneek
1 Replies
3. Shell Programming and Scripting
Hi,
I did a df|awk| command and it returns a percentage "94%",
how could I only get the integer part
"94" out of it, so I can compare it to another number,
I knwo that I have to pipe it to sth, but "grep " did not work, it still give me number WITH the percentage, does someone know what... (3 Replies)
Discussion started by: ericaworld
3 Replies
4. Programming
I had seen this error for the first time .....
error: initializer expression list treated as compound expression
please help.... (12 Replies)
Discussion started by: arunchaudhary19
12 Replies
5. Shell Programming and Scripting
I want each integer to be a value/element in the array, however the string is being treated as one. How can I stream these into distinct values?
PSF6INDEX=`(snmpwalk -v 2c -c 'H0meru!es' ${SWITCH} .1.3.6.1.2.1.2.2.1.2 | grep 'GigabitEthernet' | sed 's/IF-MIB::ifDescr\.//g' | awk '{print $1}' |... (1 Reply)
Discussion started by: cytriesbash
1 Replies
6. Shell Programming and Scripting
Folks
Appreciate your help in understanding issue in relation to below.
I need to pul uvalue from a file (tmpfile) and compare it with a number to make decision.
Using #!/bin/sh
contents of tmpfile :
Slot uvalue : 0.16
How I am pulling it:
unifval=`awk '/uvalue/ {print $4}' tmpfile` ... (1 Reply)
Discussion started by: wndgs
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
is there an easy way to convert integer to string in bash?
I have numbers like 1, 2, ..., 112, ...
and I would like to get
001 002 003 004 ...
Thank you,
Sarah (4 Replies)
Discussion started by: f_o_555
4 Replies
8. Shell Programming and Scripting
hi,
how to I do this?
i="4.000"
if ; then
echo "smaller"
fi
how do I convert the "4.000" to 4?
Thanks! (4 Replies)
Discussion started by: h0ujun
4 Replies
9. Shell Programming and Scripting
i have some log (temp.txt) file like
temp.txt:
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d30 9.8G 9.7G 14M 100% /opt
/dev/md/dsk/d72 187M 61M 107M 37% /osmf/mgmt
/dev/md/dsk/d71 187M 140M 29M 83% /export/home
/dev/md/dsk/d70 7.9G 4.3G 3.5G 56% /var/crash
/dev/md/dsk/d74... (6 Replies)
Discussion started by: doubt
6 Replies
10. Programming
Hello and Good day, I am currently studying C and I just finished learning about variables mainly those of integer type.
I am wondering if the list below are all there is to integer variables and there are still more that i have to learn.
Here are the list:
Char
Short
int
long
long long... (3 Replies)
Discussion started by: split_func0
3 Replies
LEARN ABOUT CENTOS
tevent_queue_tutorial
tevent_queue_tutorial(3) tevent tevent_queue_tutorial(3)
NAME
tevent_queue_tutorial - The tevent_queue tutorial
Introduction
A tevent_queue is used to queue up async requests that must be serialized. For example writing buffers into a socket must be serialized.
Writing a large lump of data into a socket can require multiple write(2) or send(2) system calls. If more than one async request is
outstanding to write large buffers into a socket, every request must individually be completed before the next one begins, even if multiple
syscalls are required.
To do this, every socket gets assigned a tevent_queue struct.
Creating a serialized async request follows the usual convention to return a tevent_req structure with an embedded state structure. To
serialize the work the requests is about to so, instead of directly starting or doing that work, tevent_queue_add must be called. When it
is time for the serialized async request to do its work, the trigger callback function tevent_queue_add was given is called. In the example
of writing to a socket, the trigger is called when the write request can begin accessing the socket.
How does this engine work behind the scenes? When the queue is empty, tevent_queue_add schedules an immediate call to the trigger callback.
The trigger callback starts its work, likely by starting other async subrequests. While these async subrequests are working, more requests
can accumulate in the queue by tevent_queue_add. While there is no function to explicitly trigger the next waiter in line, it still works:
When the active request in the queue is done, it will be destroyed by talloc_free. Talloc_free of an serialized async request that had been
added to a queue will trigger the next request in the queue via a talloc destructor attached to a child of the serialized request. This way
the queue will be kept busy when an async request finishes.
Example
* Metze: Please add a code example here.
*
Version 0.9.8 Tue Jun 17 2014 tevent_queue_tutorial(3)