The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem while making ftp of a large file rprajendran UNIX for Dummies Questions & Answers 1 05-28-2008 02:19 AM
problem in making autossh between windows and solaris girish.batra UNIX for Advanced & Expert Users 7 04-10-2008 12:04 PM
problem in making file name from date command girish.batra Shell Programming and Scripting 2 02-13-2008 03:50 AM
Problem in making shell script girish.batra Shell Programming and Scripting 4 02-08-2008 09:10 AM
DDD making problem azazel11998 High Level Programming 0 03-10-2005 07:10 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-20-2008
girish.batra girish.batra is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 73
problem in making sftp script

Dear all

I am bit new to shell scripting . I am implemented autossh between two sun solaris machines , so that when I use sftp it will not ask for the password.

Now I need to make shell script in which I have to transfer files from one server to another server automatically through root user. I try to make shell script for automatic transfer of files through sftp.

#! /bin/sh
sftp server1
lcd /girish
cd /amit
mput *
bye

after executing this shell script I have been put to sftp> prompt. When I exit from sftp , it give me three error lcd,cd mput command not found. It does not transfer files.

Please correct my shell script. I would be greatful for that.
 

Bookmarks

Tags
sftp script, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:45 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0