04-09-2012
Why dont you try it out? Add an if condition first to check that the directory name doesn't exist.
OK
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Sir/Madam,
I need a bit of your help. The problem is as follows :
I have to create a directory in unix whose name is that of system date in the dd_mon_yyyy format . I am able to extract a date in required format ina variable , but when i'm using this variable in mkdir it is not... (7 Replies)
Discussion started by: aarora_98
7 Replies
2. Shell Programming and Scripting
I want to set these params in /etc/system
set shmsys:shminfo_shmmax=2000000000
set shmseg:shminfo_shmseg=200
if this param exists, then I want to modify them
if not, I want to add them.
I can add them using >>/etc/system
but how to do the modify thing?
at least I can comment the... (4 Replies)
Discussion started by: melanie_pfefer
4 Replies
3. Shell Programming and Scripting
'm attempting to script an application for the bash shell. The application needs to check for birthday, but must check the birthday to see if the date is a) in the future b) exists at all (ie Feb 29th during non-leap years). The input is being entered in a YYYYMMDD format, so I was hoping someone... (2 Replies)
Discussion started by: DKNUCKLES
2 Replies
4. Shell Programming and Scripting
I have list of files named file_username_051208_025233.log. Here 051208 is the date and 025233 is the time.I have to run thousands of files daily.I want to put all the files depending on the date of running into a date directory.Suppose if we run files today they should put into 05:Dec:08... (3 Replies)
Discussion started by: ravi030
3 Replies
5. Shell Programming and Scripting
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies
6. UNIX for Dummies Questions & Answers
Hello Experts
let say we got a line a file named
/user/Oracle/my_catalog/default/root/webcat+backup+testing+07192011.atr
now i have to create a directory with name
webcat backup testing 07192011
by removing + and removing .atr at the given path...can it be possible
Please let me know... (4 Replies)
Discussion started by: aks_1902
4 Replies
7. Programming
Hi Team,
I have thousands of TIF files which are converted from PDF. Below is a sample of it.
LH9406_BLANCARAMOS_2012041812103210320001.tif
LH9406_BLANCARAMOS_2012041812103210320002.tif
LH9406_BLANCARAMOS_2012041812103210320003.tif
LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
Discussion started by: paragnehete
9 Replies
8. Shell Programming and Scripting
Hi
I need to create a directory when its non-existent
Having an issue with the code here because it doesn't work
can someone point what and how to change, please.
---------- Post updated at 11:08 AM ---------- Previous update was at 11:07 AM ----------
filelist=project_name/files/... (7 Replies)
Discussion started by: murari83.ds
7 Replies
9. Red Hat
Hi,
I know how to use email redirection using /etc/aliases file + postfix combination and it is working fine for existing users.
The question I have is: I want to send an email to tony@server1.example.com while tony user is actually not there. Rather, I want to redirect that email to... (0 Replies)
Discussion started by: freebird8z
0 Replies
10. Shell Programming and Scripting
I read that whenever you provide wrong path at sha-bang it will generate an error with message "command not found", but when I run script with wrong path, it runs perfectly without generating any error. any reason ?
#!/home/usrname/etc
echo "hello"
exit 0 (4 Replies)
Discussion started by: Qazi
4 Replies
LEARN ABOUT MOJAVE
pcap_activate
PCAP_ACTIVATE(3PCAP) PCAP_ACTIVATE(3PCAP)
NAME
pcap_activate - activate a capture handle
SYNOPSIS
#include <pcap/pcap.h>
int pcap_activate(pcap_t *p);
DESCRIPTION
pcap_activate() is used to activate a packet capture handle to look at packets on the network, with the options that were set on the handle
being in effect.
RETURN VALUE
pcap_activate() returns 0 on success without warnings, a non-zero positive value on success with warnings, and a negative value on error.
A non-zero return value indicates what warning or error condition occurred.
The possible warning values are:
PCAP_WARNING_PROMISC_NOTSUP
Promiscuous mode was requested, but the capture source doesn't support promiscuous mode.
PCAP_WARNING_TSTAMP_TYPE_NOTSUP
The time stamp type specified in a previous pcap_set_tstamp_type() call isn't supported by the capture source (the time stamp type
is left as the default),
PCAP_WARNING
Another warning condition occurred; pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display a message
describing the warning condition.
The possible error values are:
PCAP_ERROR_ACTIVATED
The handle has already been activated.
PCAP_ERROR_NO_SUCH_DEVICE
The capture source specified when the handle was created doesn't exist.
PCAP_ERROR_PERM_DENIED
The process doesn't have permission to open the capture source.
PCAP_ERROR_PROMISC_PERM_DENIED
The process has permission to open the capture source but doesn't have permission to put it into promiscuous mode.
PCAP_ERROR_RFMON_NOTSUP
Monitor mode was specified but the capture source doesn't support monitor mode.
PCAP_ERROR_IFACE_NOT_UP
The capture source device is not up.
PCAP_ERROR
Another error occurred. pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display a message describing
the error.
If PCAP_WARNING_PROMISC_NOTSUP, PCAP_ERROR_NO_SUCH_DEVICE, or PCAP_ERROR_PERM_DENIED is returned, pcap_geterr() or pcap_perror() may be
called with p as an argument to fetch or display an message giving additional details about the problem that might be useful for debugging
the problem if it's unexpected.
Additional warning and error codes may be added in the future; a program should check for positive, negative, and zero return codes, and
treat all positive return codes as warnings and all negative return codes as errors. pcap_statustostr() can be called, with a warning or
error code as an argument, to fetch a message describing the warning or error code.
SEE ALSO
pcap(3PCAP)
7 April 2014 PCAP_ACTIVATE(3PCAP)