05-29-2008
Thanks. But that option is not working for me. It just displays the error message in console as "unknown host or invalid literal address".
But the exit_status still shows as zero
![Frown Smilie](https://www.unix.com/images/smilies/frown.gif)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Help!!!! Can Anyone out there help me? I need to write a script to automate a task to translate files. The files will be transfered through ftp to the workstation. Is there a way to check the file status whether the file has finished being transfered or still transfering. Or is there a way to... (3 Replies)
Discussion started by: sean76
3 Replies
2. Shell Programming and Scripting
I hope one of you smart people out there can help me with what seems like a real simple questing but I can't quite figure out.
In a script I am doing a cmp on two files. I am trying to check the exit status with an if statement but can't seem to figure out the syntax. If the exit status is 1 I... (4 Replies)
Discussion started by: PrimeRibAndADew
4 Replies
3. Shell Programming and Scripting
Hi ,
I want to write a FTP Script which checks the No of Vesions of the files in Archive Dir and if count >= 8 Delete the oldest file from the Archive Dir and if the count is <= 8 Move the file to the Archive Dir with a CurrentDate concatenation and FTP the file to the FTP directory and send... (1 Reply)
Discussion started by: kailash.jadhav
1 Replies
4. Shell Programming and Scripting
Hi
I am doing a FTP process through which I am copying a file from my local server to Remote server. After this I want to check the size of the file
Below is my program:
LOCALDIR=/batch/ediprocess
REMOTESERVER=test.appl.com
REMOTEPATH=batch/ftpTest
LOGIN=px
PASSWORD=abcd
ftp -n... (3 Replies)
Discussion started by: shanth_chandra
3 Replies
5. Shell Programming and Scripting
Hi,
Is there any way to check the status of the mail sent or not.e.g
mail -s "Error Message" abc@xyz.com <aaa/bbb/data.txt
Can it return a status code which will confirm the delivery of mail sent?Please suggest.
Thanks,
Anil (1 Reply)
Discussion started by: anil029
1 Replies
6. Shell Programming and Scripting
Hi All,
I like to check the status of sendmail and take the appropriate action based on success / failure etc.
I have gone through one of the thread where a suggestion is made to use RC for return code
Following is the code:
==================================
#!/usr/bin/bash
export... (0 Replies)
Discussion started by: tmanda
0 Replies
7. Shell Programming and Scripting
Can I use -ctime/-mtime to verify if a particular directory has been updated or not?
I don't care about number of days. I just want to perform some operations only if the folder is modified (or it's metadata is modified), i.e. some files are added to the directory.
This thread has a more... (1 Reply)
Discussion started by: Pramit
1 Replies
8. Shell Programming and Scripting
I am trying to delete old file in ftp server, after transferring new file successfully .
but here i am checking both the file available or not using ls command.
if both the file available means i need to get file_new and file_old file size as greater than zero.
but i am getting only for... (3 Replies)
Discussion started by: elango963
3 Replies
9. UNIX for Advanced & Expert Users
Hi Experts,
Can some one let me know the FTP commands to check the file status i.e i want to check whether my files are locked or in open status.
I am connecting FTP from local machine.
Regards,
Spidy (1 Reply)
Discussion started by: spidy
1 Replies
10. UNIX for Beginners Questions & Answers
How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies
LEARN ABOUT CENTOS
ipsec_subnettypeof
IPSEC_INITSUBNET(3) Library Functions Manual IPSEC_INITSUBNET(3)
NAME
ipsec_initsubnet, ipsec_addrtosubnet, ipsec_subnettypeof, ipsec_masktocount, ipsec_networkof, ipsec_maskof - initialize an ip_subnet, ini-
tialize a singleton ip_subnet, get address type of an ip_subnet, convert subnet mask to bit count, get base address of an ip_subnet, get
subnet mask of an ip_subnet
SYNOPSIS
#include <libreswan.h>
const char *initsubnet(const ip_address *addr,
int maskbits, int clash, ip_subnet *dst);
const char *addrtosubnet(const ip_address *addr,
ip_subnet *dst);
int subnettypeof(const ip_subnet *src);
int masktocount(const ip_address *src);
void networkof(const ip_subnet *src, ip_address *dst);
void maskof(const ip_subnet *src, ip_address *dst);
DESCRIPTION
The <libreswan.h> library uses an internal type ip_subnet to contain a description of an IP subnet (base address plus mask). These func-
tions provide basic tools for creating and examining this type.
Initsubnet initializes a variable *dst of type ip_subnet from a base address and a count of mask bits. The clash parameter specifies what
to do if the base address includes 1 bits outside the prefix specified by the mask (that is, in the ``host number'' part of the address):
'0' zero out host-number bits
'x' non-zero host-number bits are an error
Initsubnet returns NULL for success and a pointer to a string-literal error message for failure; see DIAGNOSTICS.
Addrtosubnet initializes an ip_subnet variable *dst to a ``singleton subnet'' containing the single address *addr. It returns NULL for
success and a pointer to a string-literal error message for failure.
Subnettypeof returns the address type of a subnet, normally AF_INET or AF_INET6. (The <libreswan.h> header file arranges to include the
necessary headers for these names to be known.)
Masktocount converts a subnet mask, expressed as an address, to a bit count suitable for use with initsubnet. It returns -1 for error; see
DIAGNOSTICS.
Networkof fills in *dst with the base address of subnet src.
Maskof fills in *dst with the subnet mask of subnet src, expressed as an address.
SEE ALSO
inet(3), ipsec_ttosubnet(3), ipsec_rangetosubnet(3)
DIAGNOSTICS
Fatal errors in initsubnet are: unknown address family; unknown clash value; impossible mask bit count; non-zero host-number bits and clash
is 'x'. Fatal errors in addrtosubnet are: unknown address family. Fatal errors in masktocount are: unknown address family; mask bits not
contiguous.
HISTORY
Written for the FreeS/WAN project by Henry Spencer.
12 March 2002 IPSEC_INITSUBNET(3)