01-02-2014
hi bartus11,
it work..thank you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
My script is reading a log file line by line
log file is like ;
19:40:22 :INFO Total time taken to Service External Request---115ms
19:40:25 DEBUG : Batch processed libdaemon.x86_64 0-0.10-5.el5 - u
19:40:22 INFO Total time taken to Service External Request---20ms
19:40:24... (4 Replies)
Discussion started by: subin_bala
4 Replies
2. UNIX for Dummies Questions & Answers
Hey. This is pretty easy stuff but I'm learning the basics of Unix at the moment so keep that in mind. I have to:
1) Write a C-shell script to monitor user activity on the server for 13 minutes.
2) Then print the smallest and largest number of users during these 13 minutes.
I have this:
1)... (2 Replies)
Discussion started by: amp10388
2 Replies
3. Shell Programming and Scripting
Hey,
This is a long-shot however, I am stuck with the following problem:
I have the output from ls -la, and I want to sort some of that data out by using AWK to filter it.
ls -la | awk -f scriptname.awk
Input:
For example:
drwxr-xr-x 3 user users 4096 2010-03-14 20:15 bin/... (5 Replies)
Discussion started by: abciscool
5 Replies
4. UNIX for Dummies Questions & Answers
Hii i have a file with data as shown below. Here i need to remove duplicates of the rows in such a way that
it just checks for 2,3,4,5 column for duplicates.When deleting duplicates,retain largest row i.e with many columns with values should be selected.Then it must remove duplicates such that by... (11 Replies)
Discussion started by: reva
11 Replies
5. Shell Programming and Scripting
considering the following table:
ID col1 col2 col3 col4
1 -16.06801249 13.49785832 -56.57087607 -27.00500526
2 -1.53315720 0.71731735 -42.03602078 -39.78554623
3 -1.53315190 0.71731587 -42.03601548 ... (3 Replies)
Discussion started by: Birda
3 Replies
6. Shell Programming and Scripting
I have data that looks like this:
chr1 mm9_knownGene exon 155747075 155747189 0.000000 + . gene_id "Glul"; transcript_id "uc007daq.1";
chr1 mm9_knownGene exon 155750064 155750076 0.000000 + . gene_id "Glul";... (3 Replies)
Discussion started by: pbluescript
3 Replies
7. Shell Programming and Scripting
Hi,
Here's my data -
aa
bb
cc
aa
dd
ee
Now I need to find the smallest block surrounded by aa & dd. Following is not helpful -
sed -n '/aa/,/dd/p' file
I need only -
aa
dd (1 Reply)
Discussion started by: nexional
1 Replies
8. Shell Programming and Scripting
Input file :
5 20
500 2
20 41
41 0
23 1
Desired output :
5
2
20
0
1
By comparing column 1 and 2 in each line, I hope can print out the column with smallest number.
I did try the following code, but it don't look good :( (2 Replies)
Discussion started by: perl_beginner
2 Replies
9. Shell Programming and Scripting
Hi,
Anybody know how to print out the record that shown smallest number among column 3 and column 4
Case 1 Input :
37170 37196 77 51
37174 37195 73 52
37174 37194 73 53
Case 1 Output :
37170 37196 77 51
Case 2 Input :
469613 469660 73 ... (4 Replies)
Discussion started by: cpp_beginner
4 Replies
10. Shell Programming and Scripting
Hi All
I need to find the smallest values between replicates id (column1)
Input file:
a name1 1200
a name2 800
b name1 100
b name2 150
b name3 4output:
a name2 800
b name3 4
Do you have any suggestion?
Thank you! (9 Replies)
Discussion started by: giuliangiuseppe
9 Replies
LEARN ABOUT NETBSD
pcap_get_selectable_fd
PCAP_GET_SELECTABLE_FD(3) Library Functions Manual PCAP_GET_SELECTABLE_FD(3)
NAME
pcap_get_selectable_fd - get a file descriptor on which a select() can be done for a live capture
SYNOPSIS
#include <pcap/pcap.h>
int pcap_get_selectable_fd(pcap_t *p);
DESCRIPTION
pcap_get_selectable_fd() returns, on UNIX, a file descriptor number for a file descriptor on which one can do a select() or poll() to wait
for it to be possible to read packets without blocking, if such a descriptor exists, or -1, if no such descriptor exists. Some network
devices opened with pcap_create() and pcap_activate(), or with pcap_open_live(), do not support select() or poll() (for example, regular
network devices on FreeBSD 4.3 and 4.4, and Endace DAG devices), so -1 is returned for those devices.
Note that on most versions of most BSDs (including Mac OS X) select() and poll() do not work correctly on BPF devices;
pcap_get_selectable_fd() will return a file descriptor on most of those versions (the exceptions being FreeBSD 4.3 and 4.4), a simple
select() or poll() will not return even after the read timeout expires. To work around this, an application that uses select() or poll()
to wait for packets to arrive must put the pcap_t in non-blocking mode, and must arrange that the select() or poll() have a timeout less
than or equal to the read timeout, and must try to read packets after that timeout expires, regardless of whether select() or poll() indi-
cated that the file descriptor for the pcap_t is ready to be read or not. (That workaround will not work in FreeBSD 4.3 and later; how-
ever, in FreeBSD 4.6 and later, select() and poll() work correctly on BPF devices, so the workaround isn't necessary, although it does no
harm.)
Note also that poll() doesn't work on character special files, including BPF devices, in Mac OS X 10.4 and 10.5, so, while select() can be
used on the descriptor returned by pcap_get_selectable_fd(), poll() cannot be used on it those versions of Mac OS X. Kqueues also don't
work on that descriptor. poll(), but not kqueues, work on that descriptor in Mac OS X releases prior to 10.4; poll() and kqueues work on
that descriptor in Mac OS X 10.6 and later.
pcap_get_selectable_fd() is not available on Windows.
RETURN VALUE
A selectable file descriptor is returned if one exists; otherwise, -1 is returned.
SEE ALSO
pcap(3), select(2), poll(2)
5 April 2008 PCAP_GET_SELECTABLE_FD(3)