11-06-2008
where i need to add 2>&1 in my code
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
below is my script which copies test file to each directory in the file and checks if the permissions are ok, but I am not able to capture the log of the output.
here is the script
#! /usr/bin/sh
set -x
cd /dir/of/files
while read line
do
cp test.txt $line
rm $line/test.txt
done <... (3 Replies)
Discussion started by: mgirinath
3 Replies
2. UNIX for Advanced & Expert Users
Hi All,
Please check the below ftp related job, which is deleting the files from remote host. Problem is it is not capturing the ftp failure error, and the exit status is still '0' eventhough the deletable files are not present in remote location OR ftp credential are incorrect.
... (5 Replies)
Discussion started by: ganapati
5 Replies
3. Shell Programming and Scripting
Hello All,
I have searched the thread for capturing and got some suggestion but that is not working for me.
I am trying to sftp to a window server from unix server and getting file there with out any issue .But i wan't to capture the error --in case a file is not exist in remote.
Example :... (1 Reply)
Discussion started by: jambesh
1 Replies
4. Shell Programming and Scripting
Hi,
I have a script which does multiple tasks in sequence. When i execute the script, it runs and displays lot of messages for each of the steps on the console. Is there any way I can capture those messages and store it for audit purposes ?
Best Regards,
bornon2303 (2 Replies)
Discussion started by: bornon2303
2 Replies
5. Shell Programming and Scripting
Hi
Is there a way that I can capture a shell script (both output and input) to a log file where I can analyze it?
Thanks (6 Replies)
Discussion started by: nimo
6 Replies
6. Red Hat
Can someone please help me how do I find a URL from lines of log file and write all the output to a new file?
For e.g - Log file has similar entries,
39.155.67.5 - - "GET /abc/login?service=http://161.120.36.39/CORPHR/TMA2007/default.asp HTTP/1.1" 401 3218
54.155.63.9 - - "GET... (2 Replies)
Discussion started by: rockf1bull
2 Replies
7. Shell Programming and Scripting
Hi Guys,
I am trying to capture the FTP Logs in a log file.
I am using the below code.
ftp -d -n -v $Remote_Host << EOD > $Ftp_LOG;
Since iam running the script in debug mode, i am able to see that the ftp is done and the file has been transferred.
But the log file does not have... (7 Replies)
Discussion started by: mac4rfree
7 Replies
8. Shell Programming and Scripting
Can we capture and write all the error messages which were being displayed on the command prompt screen during execution of a program into a log file?
If yes, can anyone please let me know on how to do it?
I am using ksh and working on AIX server.
Thank you in advance. (4 Replies)
Discussion started by: vpv0002
4 Replies
9. Solaris
OS: Solaris 9
Configuration /etc/syslog.conf
daemon.debug
/etc/inetd.conf
ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -A -l -d
Found the ftp.log only generate those entries from other servers/hosts.
Can we trace on all ftp entries either from/to the server?
... (6 Replies)
Discussion started by: KhawHL
6 Replies
10. Shell Programming and Scripting
I have a script
#!/bin/bash
HOST=ftp.example.com
USER=ftpuser
PASSWORD=P@ssw0rd
ftp -inv $HOST <<EOF
user $USER $PASSWORD
cd /path/to/file
mput *.html
bye
EOF
the script executes sucessfully I need to capture the FTP logs to a logfile
should contain
FTP Login successful
... (1 Reply)
Discussion started by: rajeshas83
1 Replies
LEARN ABOUT OPENSOLARIS
ldap_add
ldap_add(3LDAP) LDAP Library Functions ldap_add(3LDAP)
NAME
ldap_add, ldap_add_s, ldap_add_ext, ldap_add_ext_s - perform an LDAP add operation
SYNOPSIS
cc[ flag... ] file... -lldap[ library... ]
#include <lber.h>
#include <ldap.h>
intldap_add(LDAP *ld, char *dn, LDAPMod *attrs[]);
intldap_add_s(LDAP *ld, char *dn, LDAPMod *attrs[]);
int ldap_add_ext(LDAP *ld, char *dn, LDAPMod **attrs,
LDAPControl **serverctrls, int * msgidp);
int ldap_add_ext_s(LDAP *ld, char *dn, LDAPMod **attrs,
LDAPControl **serverctrls, LDAPControl **clientctrls);
DESCRIPTION
The ldap_add_s() function is used to perform an LDAP add operation. It takes dn, the DN of the entry to add, and attrs, a null-terminated
array of the entry's attributes. The LDAPMod structure is used to represent attributes, with the mod_type and mod_values fields being used
as described under ldap_modify(3LDAP), and the ldap_op field being used only if you need to specify the LDAP_MOD_BVALUES option. Other-
wise, it should be set to zero.
Note that all entries except that specified by the last component in the given DN must already exist. ldap_add_s() returns an LDAP error
code indicating success or failure of the operation. See ldap_error(3LDAP) for more details.
The ldap_add() function works just like ldap_add_s(), but it is asynchronous. It returns the message id of the request it initiated. The
result of this operation can be obtained by calling ldap_result(3LDAP).
The ldap_add_ext() function initiates an asynchronous add operation and returns LDAP_SUCCESS if the request was successfully sent to the
server, or else it returns a LDAP error code if not (see ldap_error(3LDAP)). If successful, ldap_add_ext() places the message id of
*msgidp. A subsequent call to ldap_result(), can be used to obtain the result of the add request.
The ldap_add_ext_s() function initiates a synchronous add operation and returns the result of the operation itself.
ERRORS
ldap_add() returns -1 in case of error initiating the request, and will set the ld_errno field in the ld parameter to indicate the error.
ldap_add_s() will return an LDAP error code directly.
ATTRIBUTES
See attributes(5) for a description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWcsl (32-bit) |
| |SUNWcslx (64-bit) |
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
ldap(3LDAP), ldap_error(3LDAP), ldap_modify(3LDAP), attributes(5)
SunOS 5.11 27 Jan 2002 ldap_add(3LDAP)