10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi ALL,
I have a shell script using except :
#!/bin/bash
HOST=abc.com
USER=abc
PASSWORD=123
SOURCE_FILE=file1.zip
TARGET_DIR=/A/B/C
/usr/bin/expect <<- EOF
spawn /usr/bin/sftp $USER@$HOST
expect "password:"
send "$PASSWORD\r"
expect "sftp>"
send "cd patch1\n"
... (11 Replies)
Discussion started by: Asad
11 Replies
2. Shell Programming and Scripting
Hi,
Can somebody please let me know if we can redirect variable value to the sftp connection. I am trying to run the attached snippet but facing an error.
dev@UAT.com> export USER1=ftp
dev@UAT> export HOST1=XX.XX.XX.XX
dev@UAT> export INPUTDATA2='lcd /Z02/apps/output/UAT/CMUP/incoming cd... (9 Replies)
Discussion started by: Khan28
9 Replies
3. Shell Programming and Scripting
Hi All,
I have a pretty demanding requirement for an SFTP script I have been trying to put together.
I have nearly 100 files (all with the names staring with T_PROD) generated in my local server daily. I need to transfer each of these files to a remote server via SFTP (that's a client... (6 Replies)
Discussion started by: Aviktheory11
6 Replies
4. Shell Programming and Scripting
Hello fellow UNIX gurus :)
I have a problem regarding the script below:
# Variables used in this shell.
power=0 # Stores squared integer
total=0 # Sum of all squared integers
num=0 # Stores command line arguements
# Provides error handling if command line... (5 Replies)
Discussion started by: Learn4Life
5 Replies
5. Programming
I would like to create console application in c# to automate the process of downloading some files from a SFTP server to my local hard drive at a set time each week/day.
SFTP Server installed OpenSSH for windows and client machine also.
Any ideas how I could do such a task? or sample code.
... (0 Replies)
Discussion started by: sufiiyan
0 Replies
6. Shell Programming and Scripting
Below code works for different databases i.e. MYSQL and ORACLE
The problem is for MYSQL in Block: if ; $? taking value accordingly but in case of ORACLE $? is always taking this value as zero (0).
That is the reason in Oracle it always going in else Block in any case.. :(
and in case of ... (4 Replies)
Discussion started by: ambarginni
4 Replies
7. 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
8. Shell Programming and Scripting
Helo Experts,
I need a help in handling errors in shell script, wants my errors displayed in text file instead of command window..
My shell script is here;
cd /cygdrive/s/Files
for FILES in ./*.*
do
temp=`basename $FILES`
if cp $FILES /cygdrive/r/CopyFile1/$FILES; then
echo "copy... (5 Replies)
Discussion started by: CelvinSaran
5 Replies
9. Shell Programming and Scripting
Hi ,
Can any one tell me is there any standard method to track errors during sftp ?
using which command i can track sftp errors ? i tried using echo $? .
Most of the times i am getting error number 127 ,1, 255. whether it is constant numbers ?
Please help me out. Thanks in advance (2 Replies)
Discussion started by: deepusunil
2 Replies
10. Shell Programming and Scripting
Dear friends,
I am using the below command in my unix script
-----------------------------------------------
File_Name=`ls $CTRY*$DATE_SUFFIX*zip` --> Command-1
.....
if
then
unzip -a $File_Name -d $CTRY_DIR/$CTRY
else
echo "File for $CTRY dated $DATE_SUFFIX does not exist... (2 Replies)
Discussion started by: sureshg_sampat
2 Replies