Sponsored Content
Full Discussion: SFTP error in UNIX
Top Forums Shell Programming and Scripting SFTP error in UNIX Post 302980216 by Jesshelle David on Thursday 25th of August 2016 10:27:33 AM
Old 08-25-2016
SFTP error in UNIX

I have this code snippet:
Code:
sftp $USERNAME@$REMOTE_SERVER -omode=ascii >> $LOG_FILEPATH/$LOG_FILENAME  2>&1                                    
ls /+showall                                                                                                    
ls /+ mode=text,recfm=fb,lrecl=80,space=trk.8.1,release                                                            
##quote site file=jes
pwd                                                                                                                
lcd $LOCAL_DIRECTORY
lpwd                                                                                                            
$DIRECTION $LOCAL_FILENAME $REMOTE_FILENAME                                                                        
ls $REMOTE_FILENAME                                                                                                
cd //$REMOTE_DIRECTORY                                                                                            
ls /+mode=text,jesjobwait                                                                                        
lcd $BIN_PATH                                                                                                    
lpwd                                                                                                            
$DIRECTION $LOCAL_JOBNAME $REMOTE_JOBNAME                                                                        
ls $REMOTE_JOBNAME                                                                                                
get /+/error.log                                                                                                 
quit

and i get the following error when i execute this program:

Code:
syntax error at line 157: `end of file' unexpected

Please advise.

Thanks,
Jess

Last edited by rbatte1; 08-26-2016 at 04:20 AM.. Reason: Added CODE tags for output
 

10 More Discussions You Might Find Interesting

1. HP-UX

sftp from unix to NT

Hi, 1) I want help on SFTP,Some commands not working in SFTP,but working in FTP example: bin,ls -xt ,user. Any alternate methos for this 2) if I want download files from UNIX to NT,I am able to download,but file format not connverting according to UNIX format(in NT end of line \n,but in... (1 Reply)
Discussion started by: anthonykomma
1 Replies

2. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

3. Linux

SFTP on SCO Unix

Hi, I have a request to install sftp on the Sco Unix Server. Request you please let me know the process for the installation of SFTP on Sco Unix Server. Thanks & Regards Arun (2 Replies)
Discussion started by: Arun.Kakarla
2 Replies

4. Shell Programming and Scripting

SFTP from Unix to Windows

Hi all Not sure where I should be posting this so apologies if it's in the wrong section. I'm trying to set up a system where we can copy a file (get) from a Windows server to a Unix server using SFTP in an automated way. I've installed CoreFTP Server on the Windows server and can connect... (2 Replies)
Discussion started by: huskie69
2 Replies

5. Shell Programming and Scripting

sftp to UNIX host

Hi, I am writing a shell script that securely connects to an UNIX host and transfer file(abc.txt) from the local machine to the host. sftp user@host get abc.txt bye The code doesn't work.. It throws error at line 2: get :Unknown get command. How can I rectify this problem? (2 Replies)
Discussion started by: Kishore_1
2 Replies

6. Shell Programming and Scripting

SFTP in UNIX

I need create a Shell script to do the SFTP process. How can i provide username and password in the script.I had the below code.But it ask for password.How can i add user name and password in this code echo "OK, starting now..." sftp -b /dev/fd/0 testwasds3l<<EOF cd /opt/isproj/VOM/Scripts... (2 Replies)
Discussion started by: morbid_angel
2 Replies

7. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

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. UNIX for Dummies Questions & Answers

Sftp from UNIX to mainframe

Hi, I have many scripts where i have used sftp for file transfer from unix box to unix box.. Now that we have to sftp files from unix to mainframe, i would like to know if that is possible. I just tried in the same way i did from unix to unix, but i got the error as connection refused. Are... (2 Replies)
Discussion started by: dnat
2 Replies

9. UNIX for Dummies Questions & Answers

SFTP error between UNIX to iSeries (Write Failed Broken Pipe)

Hi, I am iseries resource and having Issue in one of the sFTP failures between one of my job (Unix --> iSeries). The response to sending machine (Unix) is "Write Failed Broken Pipe". Appreciate any help Available on why this Issue happens, how can we replicate the same, what fixes can... (1 Reply)
Discussion started by: hamelchauhan
1 Replies

10. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies
RAKE(1) 						 Ruby Programmers Reference Guide						   RAKE(1)

NAME
rake -- Ruby Make SYNOPSIS
rake [--f Rakefile] [--version] [-CGNPgnqstv] [-D [PATTERN]] [-E CODE] [-I LIBDIR] [-R RAKELIBDIR] [-T [PATTERN]] [-e CODE] [-p CODE] [-r MODULE] [--rules] [variable=value] target ... DESCRIPTION
Rake is a simple ruby(1) build program with capabilities similar to the regular make(1) command. Rake has the following features: o Rakefiles (Rake's version of Makefiles) are completely defined in standard Ruby syntax. No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?). o Users can specify tasks with prerequisites. o Rake supports rule patterns to synthesize implicit tasks. o Flexible FileLists that act like arrays but know about manipulating file names and paths. o A library of prepackaged tasks to make building rakefiles easier. OPTIONS
--version Display the program version. -C --classic-namespace Put Task and FileTask in the top level namespace -D [PATTERN] --describe [PATTERN] Describe the tasks (matching optional PATTERN), then exit. -E CODE --execute-continue CODE Execute some Ruby code, then continue with normal task processing. -G --no-system --nosystem Use standard project Rakefile search paths, ignore system wide rakefiles. -I LIBDIR --libdir LIBDIR Include LIBDIR in the search path for required modules. -N --no-search --nosearch Do not search parent directories for the Rakefile. -P --prereqs Display the tasks and dependencies, then exit. -R RAKELIBDIR --rakelib RAKELIBDIR --rakelibdir RAKELIBDIR Auto-import any .rake files in RAKELIBDIR. (default is rakelib ) -T [PATTERN] --tasks [PATTERN] Display the tasks (matching optional PATTERN) with descriptions, then exit. -e CODE --execute CODE Execute some Ruby code and exit. -f FILE --rakefile FILE Use FILE as the rakefile. -h --help Prints a summary of options. -g --system Using system wide (global) rakefiles (usually ~/.rake/*.rake ). -n --dry-run Do a dry run without executing actions. -p CODE --execute-print CODE Execute some Ruby code, print the result, then exit. -q --quiet Do not log messages to standard output. -r MODULE --require MODULE Require MODULE before executing rakefile. -s --silent Like --quiet, but also suppresses the 'in directory' announcement. -t --trace Turn on invoke/execute tracing, enable full backtrace. -v --verbose Log message to standard output (default). --rules Trace the rules resolution. SEE ALSO
ruby(1) make(1) http://rake.rubyforge.org/ REPORTING BUGS
Bugs, features requests and other issues can be logged at <http://onestepback.org/redmine/projects/show/rake>. You will need an account to before you can post issues. Register at <http://onestepback.org/redmine/account/register>. Or you can send an email to the author. AUTHOR
Rake is written by Jim Weirich <jim@weirichhouse.org> UNIX
November 7, 2012 UNIX
All times are GMT -4. The time now is 11:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy