I know this is a total begginer question but what is wrong with this picture. My loop wont loop, it just drops me back to the prompt and gives the error "unary operator expected". Any help would be appreciated.
here it is,
#!/bin/sh
selection=
while
do
cat << MENU
1)List files in... (2 Replies)
ok i just installed FreeBSD 4.8 on a computer i had lying around and it was working ok but then when i tried to set up KDE's xdm (kdm) i think i must have configured the login manager wrong because i cant login through the kdm and therefore i can log in to BSD at all?!
please can someone help me... (5 Replies)
I don't even know if this should go here but I just would like to know what this means:
d0e45878043844ffc41aac437e86b602
I know absolutely nothin' about UNIX, and I found this in a SQL table in a board I run.
Someone please tell me what that is in "normal" mode.
Pardon me for my... (4 Replies)
I am wanting to download the Linux Program. When i go to download it I see several things to download. What do i download exactly? Then what do I do to install it. Also I have partitioned my hard drive to make way for Linux on the other part to play with it, will any problems arise from this?
I... (3 Replies)
This is probably a really simple problem, but goes easy on me I'm still a newb. The problem I have is that a script (we'll call it script.script) I edited won't run for some reason, I get the error "ksh: script.script: not found"
The location of my script is as follows: /home/users/arkitech
... (3 Replies)
Assume $x equals "".
If I try:
if test -n $x
I get the "Expression syntax" error.
It works in Linux but not in unix bash. In unix bourne I get "test: argument expected" (4 Replies)
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Hi everyone.
I am new to shell scripting and have been looking at quite a few web pages to try and figure this out, but to no avail.
What I am trying to do is get a value from a text file that contains a paragraph of information.. Something similar too:
Welcome to random script
You are... (1 Reply)
This should be extremely simple and someone will probably answer it in .5 seconds. I need to know what:
VARIABLE=${0##*/}
does? I do not have a shell handy to just try it in. I am reading through some scripts and need to understand this line. Any help is appreciated.
Many thanks!
-... (3 Replies)
Hi,
I have a variable called result that get the the below value i.e two lines assigned../logs/mymac/myserver.log:####<Jun 7, 2015 12:56:54 PM EDT> <myserver.my.bank.com> <mymac> < ExecuteThread: '5' for queue:\
'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1434640> <BEA-0900>... (0 Replies)
Discussion started by: shifahim
0 Replies
LEARN ABOUT LINUX
pcap_stats
PCAP_STATS(3PCAP)PCAP_STATS(3PCAP)NAME
pcap_stats - get capture statistics
SYNOPSIS
#include <pcap/pcap.h>
int pcap_stats(pcap_t *p, struct pcap_stat *ps);
DESCRIPTION
pcap_stats() fills in the struct pcap_stat pointed to by its second argument. The values represent packet statistics from the start of the
run to the time of the call.
pcap_stats() is supported only on live captures, not on ``savefiles''; no statistics are stored in ``savefiles'', so no statistics are
available when reading from a ``savefile''.
A struct pcap_stat has the following members:
ps_recv
number of packets received;
ps_drop
number of packets dropped because there was no room in the operating system's buffer when they arrived, because packets
weren't being read fast enough;
ps_ifdrop
number of packets dropped by the network interface or its driver.
The statistics do not behave the same way on all platforms. ps_recv might count packets whether they passed any filter set with pcap_set-
filter(3PCAP) or not, or it might count only packets that pass the filter. It also might, or might not, count packets dropped because
there was no room in the operating system's buffer when they arrived. ps_drop is not available on all platforms; it is zero on platforms
where it's not available. If packet filtering is done in libpcap, rather than in the operating system, it would count packets that don't
pass the filter. Both ps_recv and ps_drop might, or might not, count packets not yet read from the operating system and thus not yet seen
by the application. ps_ifdrop might, or might not, be implemented; if it's zero, that might mean that no packets were dropped by the
interface, or it might mean that the statistic is unavailable, so it should not be treated as an indication that the interface did not drop
any packets.
RETURN VALUE
pcap_stats() returns 0 on success and returns -1 if there is an error or if p doesn't support packet statistics. If -1 is returned,
pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display the error text.
SEE ALSO pcap(3PCAP), pcap_geterr(3PCAP)
7 September 2009 PCAP_STATS(3PCAP)