How to Write sftp through "expect" for file upload ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to Write sftp through "expect" for file upload ?
# 1  
Old 03-24-2011
How to Write sftp through "expect" for file upload ?

Hi Experts ,

I am new to unix programming please tell me how to write expect and hoe to call it for automated file upload process.
help me really !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

3. Shell Programming and Scripting

SFTP batch not renaming file with "put"

I have a .ksh script that creates an sftp batch file and runs it through sftp. It works except for one thing. If I try to "put" to a different name, it doesn't use the specified remote name...it still "puts" the original local name. I've tried both of these, and neither work...it will always... (4 Replies)
Discussion started by: dbiggied
4 Replies

4. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

5. Shell Programming and Scripting

Problems with "write" and "wall"

Hello, I am using VirtualBox to simulate a small network with two Linux computers, the host is Mac OS X. My problem is that I can't send "write" and "wall" messages from the host to one of those Linux computers. Here is what works: - The virtual Linux computer answers "ping" messages that have... (5 Replies)
Discussion started by: 123_abc
5 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

sftp can't fine batchfile "No such file or directory"

Hi, I've got a C program that is using execlp to run a non-interactive sftp (using a batchfile) session to send some files to another system. Just before doing that, I create the batchfile called sftp_batch on the fly: V8_26_1:sun-->cat /workspace/sftp_batch cd /tmp/newsftp put test.file... (2 Replies)
Discussion started by: Fiaran
2 Replies

8. Shell Programming and Scripting

script to read a line with spaces bet " " and write to a file

Hi, I need a command in UNIX KSH below is the description... MAPPING DESCRIPTION ="Test Mapping for the calid inputs" ISVALID ="YES" NAME ="m_test_xml" OBJECTVERSION ="1" VERSIONNUMBER ="1" unix ksh command to read the DESCRIPTION and write to a file Test Mapping for the calid inputs... (3 Replies)
Discussion started by: perlamohan
3 Replies

9. Shell Programming and Scripting

Scripting multiple file "puts" in sFTP...

I need to send multiple files to a remote server via sFTP. I had everything set up to connect and send a single file automatically using a batch file and key authentication. Recently, however, the process has changed and we now need to send multiple files, one at a time, pausing for up to ten... (5 Replies)
Discussion started by: Cbish68
5 Replies

10. Shell Programming and Scripting

communicating wth another user aside from "wall" and "write"

Hi, Can anyone suggest a Unix command or c-shell algorithm to simulate to behavior of "wall" command minus the "all users"? What I'm trying to do is to send a notice to just one particular user but i dont want other remotely-logged-on users to receive the message (on the pseudo-terminals). I... (6 Replies)
Discussion started by: Deanne
6 Replies
Login or Register to Ask a Question
dput(1) 						      General Commands Manual							   dput(1)

NAME
       dput - package upload tool for Debian

SYNTAX
       dput [options] [host] package.changes ...

DESCRIPTION
       This  is  a  tool  for uploading Debian packages into the archive. You may specify to which host it should upload the file by passing it an
       host argument. If omitted, dput uses the host specified by default_host (or, historically default_host_non-us) configuration option.   Also
       you have to pass the program one or more name of package.changes files and then they will be sequentially uploaded.

       This  program  will  then  upload  the  package for you into the archive, using a selected upload method. Currently dput supports ftp, scp,
       rsync, http, https, and local. The method scripts have been split from the main script  so  it  is  easy  to  add  new  methods.   Look	in
       /usr/share/dput/ for examples.

       Should  something  go  wrong  with your upload to destinations using the Debian upload queue daemon (e.g. ftp-master), you can remove files
       from the upload queue with dcut(1).

OPTIONS
       -c, --config - define a config file to use.

       -d, --debug - activate debugging mode, helpful if bugs occur.

       -D, --dinstall - do a dry run of dinstall after the upload.

       -f, --force - force an upload of an already uploaded package.

       -h, --help - print help information and exit.

       -H, --host-list - print the lists of hosts that dput knows about.

       -l, --lintian - run lintian before the upload.

       -U, --no-upload-log - do not write a .upload log file after uploading.

       -o, --check-only - check only the package and do not upload.

       -p, --print - print the configuration that dput is using.

       -P, --passive - use passive ftp instead of active. Note that passive ftp is the default unless specified  otherwise  in	the  configuration
       file.

       -s, --simulate - simulate an upload only.

       -u, --unchecked - don't check GnuPG signature on the changes file.

       -e,  --delayed  - Upload to a DELAYED queue, rather than the usual Incoming. This takes an argument from 0 to 15. Note that a delay of 0 is
       different from no delay at all.

       -v, --version - print version information and exit.

       -V, --check-version - check if the user has already installed and tested the package before putting it into the archive.

ENVIRONMENT
       This program doesn't depend on any environment variables. But if the variable USER is set, it will be used.

LICENSE
       This program is distributed under the terms of the GPL.

BUGS
       Please send bug reports to the author.

FILES
       /etc/dput.cf
	      global dput configuration file

       ~/.dput.cf
	      peruser dput configuration file

SEE ALSO
       dput.cf(5)
       dcut(1)
       /usr/share/doc/dput
       /usr/share/dput

AUTHOR
       dput was written Christian Kurz. The current maintainer is Thomas Viehmann <tv@beamnet.de>.

       Many other people have contributed to this code. See the Thanks file.

COMMENTS
       The author does appreciate comments and suggestions from you.

								  October 5, 2001							   dput(1)