10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have been using the SFTP commands in my reusable shell scripts to perform Get/Put operation. The script has a list of 6 errors which i am capturing through the log file using grep command.
But I feel there might me more errors which the script might need to capture. I tried to capture the... (2 Replies)
Discussion started by: Bobby_2000
2 Replies
2. Shell Programming and Scripting
Solaris 10 9/10
BASH
using the following code snippet:
sftp $TOHOST <<RESULT
cd /inbound/
lcd /transfer
put $i
bye
I want to log no server connections and the kill the script after the log entry was made. How would I do... (2 Replies)
Discussion started by: os2mac
2 Replies
3. Shell Programming and Scripting
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
Discussion started by: noobrobot
1 Replies
4. Shell Programming and Scripting
This is my .sh file
sqlplus -s my_user/my_pswd@mydb @my_sql.sql
ret_code=$?
if
then
echo "return code is $ret_code "
echo "Failed"
else
echo "return code is $ret_code "
echo "Success"
fi
=====================================================
and my_sql.sql is
whenever... (4 Replies)
Discussion started by: emailsafath2011
4 Replies
5. 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
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
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
8. 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
9. UNIX for Dummies Questions & Answers
I am trying to do the FTP using .netrc.In my .netrc file in $HOME dir i am placing the machine ip,user name and pwd.Then i am creating dynamically a file which contains the ftp commands.
My script is like below:
__________________________________
export REMOTE_DIR= <some path>
export... (4 Replies)
Discussion started by: dr46014
4 Replies
10. 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