08-05-2008
Its working
Thanks!!!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Actually I have a file which consists data . for eg names.
Then I want my sql query to read this file and produce the output.
Currently I am using this
FOR EG : FILENAME is NAMES
for i in `cat NAMES`
{
sqlplus -s $CONNECTID << EOF
spool rooh
set heading off
select... (1 Reply)
Discussion started by: rooh
1 Replies
2. Shell Programming and Scripting
Hi
I have around 100 users in sun server and have default home directory in /usr/home/<username>
I want to clean their home directory time to time to make free space on root, as users generate many output files during usage of application.
My idea is, generate a file with following command... (4 Replies)
Discussion started by: ishir
4 Replies
3. Shell Programming and Scripting
Hi,
I have to write a KSH script to loop through the directory and transfer all the files through FTP. The source machine is the Network shared drive and the files in the directory needs to be FTPied to the UNIX server.
For eg. Directory (Datasource)
+ Directory1
... (6 Replies)
Discussion started by: mahalakshmi
6 Replies
4. Shell Programming and Scripting
I run into a issue when I try to do sorting of the following with ascending order, one round of for looping seems not working, anyone knows how to use shell or perl?
$array = (5,0,3,2,7,9,8) (2 Replies)
Discussion started by: ccp
2 Replies
5. Shell Programming and Scripting
Hello, where can I get usefull information on the use of looping with for , if and while with extensive examples.
Also use of variables in scripts (1 Reply)
Discussion started by: sam4now
1 Replies
6. Shell Programming and Scripting
vesselNames values:
xxx
yyy
zzz
vesselPlanned values:
xxx
zzz
zzz
zzz
OIFS=""
OIFS=$IFS
IFS="\n" (2 Replies)
Discussion started by: finalight
2 Replies
7. Shell Programming and Scripting
Hi everyone,
I am having trouble looping through entries in a file. The file several entries that are separated by topics e.g.
<Topic r:id="Top/World/Français">
</Topic>
<Topic r:id="Top/World/Français/Actualité">
</Topic>
<Topic r:id="Top/World/Français/Actualité/A_la_Une">
<link... (1 Reply)
Discussion started by: BlueberryPickle
1 Replies
8. Shell Programming and Scripting
Hi evryone
i need a help .
i have a file xcv.the content is :
accelerate
i want a script which will run 1000 times in loop and changing the value to
accelerate to
acceler
in 1st loop and in 2nd loop it will be again
accelerate and so on . (6 Replies)
Discussion started by: Aditya.Gurgaon
6 Replies
9. Shell Programming and Scripting
so when i use rm file -i vv bb i can delete the first file vv but i cant seem to delete the second file bb as i tried to use shift on it, but it seems that it delete the first one and stops it without looping it to the next file. what is wrong with my coding ?
#!/bin/bash
function... (3 Replies)
Discussion started by: cman123
3 Replies
10. Shell Programming and Scripting
Hey guys, so I am trying to do a loop script that will go through each folder (no gui so just each domain has a folder) and grab out the databases being used on that domain. I know I would use
mysql -e "show databases where not 'information_schema';" once in each directory to pull the actual... (3 Replies)
Discussion started by: dough
3 Replies
LEARN ABOUT CENTOS
pcap_breakloop
PCAP_BREAKLOOP(3PCAP) PCAP_BREAKLOOP(3PCAP)
NAME
pcap_breakloop - force a pcap_dispatch() or pcap_loop() call to return
SYNOPSIS
#include <pcap/pcap.h>
void pcap_breakloop(pcap_t *);
DESCRIPTION
pcap_breakloop() sets a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping; they will return the number of
packets that have been processed so far, or -2 if no packets have been processed so far.
This routine is safe to use inside a signal handler on UNIX or a console control handler on Windows, as it merely sets a flag that is
checked within the loop.
The flag is checked in loops reading packets from the OS - a signal by itself will not necessarily terminate those loops - as well as in
loops processing a set of packets returned by the OS. Note that if you are catching signals on UNIX systems that support restarting system
calls after a signal, and calling pcap_breakloop() in the signal handler, you must specify, when catching those signals, that system calls
should NOT be restarted by that signal. Otherwise, if the signal interrupted a call reading packets in a live capture, when your signal
handler returns after calling pcap_breakloop(), the call will be restarted, and the loop will not terminate until more packets arrive and
the call completes.
Note also that, in a multi-threaded application, if one thread is blocked in pcap_dispatch(), pcap_loop(), pcap_next(), or pcap_next_ex(),
a call to pcap_breakloop() in a different thread will not unblock that thread; you will need to use whatever mechanism the OS provides for
breaking a thread out of blocking calls in order to unblock the thread, such as thread cancellation in systems that support POSIX threads.
Note that pcap_next() and pcap_next_ex() will, on some platforms, loop reading packets from the OS; that loop will not necessarily be ter-
minated by a signal, so pcap_breakloop() should be used to terminate packet processing even if pcap_next() or pcap_next_ex() is being used.
pcap_breakloop() does not guarantee that no further packets will be processed by pcap_dispatch() or pcap_loop() after it is called; at most
one more packet might be processed.
If -2 is returned from pcap_dispatch() or pcap_loop(), the flag is cleared, so a subsequent call will resume reading packets. If a posi-
tive number is returned, the flag is not cleared, so a subsequent call will return -2 and clear the flag.
SEE ALSO
pcap(3PCAP), pcap_loop(3PCAP), pcap_next_ex(3PCAP)
5 April 2008 PCAP_BREAKLOOP(3PCAP)