Sponsored Content
Full Discussion: SFTP - 'put' doing an 'mput'
Top Forums Shell Programming and Scripting SFTP - 'put' doing an 'mput' Post 302138065 by b0bbins on Friday 28th of September 2007 11:58:20 AM
Old 09-28-2007
Cheers Cameron,

I've put it into a wrapper script to temporarily rename the file locally for now. It's a bit of a ball-ache as we work with generic file forwarding processes and simply pass a whole load of variables into a config file.
E.g TYPE=SFTP SOURCE=/path/path/ PATTERN=*.txt DESTFILE=new.txt etc

...and the process fills in a template, performs the logging, generates alerts etc.

I've got it working but I've had to hardcode most of it and mess around with a custom template. But hey - it's working.

Ta.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mget and mput...

hello, i was interested in knowing if you can mget or mput a sequence of files: example- say i have a dir with 1000 files with the same extension e.g. *.sgi, is there a way to mget only the last 200 files? i would assume that there is a flag i would use, or something like: mget... (14 Replies)
Discussion started by: yoyomamma
14 Replies

2. UNIX and Linux Applications

sftp -> put : How to uplaod only newer files

I have tried winscp, filezilla to copy data from windows xp SP2 machine to the sun sparc unix machine. However speed is around 120 to 130 kb/sec. I do have lot of files & with large size. So I switched to windows command prompt & transfered few files using sftp command. Its very fast as compared... (0 Replies)
Discussion started by: _prasad
0 Replies

3. UNIX for Advanced & Expert Users

SFTP - Overwrite [Put -P <file>] option

Hi All Experts, I hope you are all ok! :D My question is simple but I was not able to find an answer in the internet, and that's why I am here! My question is: when I sftp to a server and use "put -P" option to put a file, it keeps the file's full permission and access time. Check below... (5 Replies)
Discussion started by: felipe.vinturin
5 Replies

4. Shell Programming and Scripting

SFTP bash put/get/rm check

Hello, i'm doing something like that #!/bin/sh sftp 172.18.255.140 <<End-Of-Session >> /usr/batch/logsftp.txt user batch ascii lcd /usr/batch get olaola.txt bye End-Of-Session   if then echo MAL >> /usr/batch/logsftp.txt echo $? >> /usr/batch/logsftp.txt exit $? else echo... (16 Replies)
Discussion started by: dexposit
16 Replies

5. Shell Programming and Scripting

SFTP PUT

Hi, ServerA (SFTP server) ServerB (SFTP client) ServerB:> sftp user@ServerA ServerB:> put sample.txt ServerB:> get sample2.txt My question is that which machine will encrypt the sample.txt and sample2.txt files. Thanks (8 Replies)
Discussion started by: Arpit Narula
8 Replies

6. Shell Programming and Scripting

In put password automatically to sftp command

Hi all, i have to sftp a file to another server I don't have "expect" or sshpass on my machine its solaris 10, i want to pass password in command line or after doing this sftp user@server how to automatically provide the password as input ( stored in some variable or so) ... (1 Reply)
Discussion started by: zozoo
1 Replies

7. Shell Programming and Scripting

./CARE_SM_SFTP.sh[27]: put: not found error while doing sftp

Hi, I am getting the below error while doing sftp in a script file but the same is getting executed when i run from command prompt ./CARE_SM2_SFTP.sh: put: not found Code :- sftp ${USER_ID}@${FTPHOST4}:/opt/path put <Filename with path> chmod 777 <FileName with Path>... (2 Replies)
Discussion started by: satishmallidi
2 Replies

8. 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

9. Linux

Put -r is not working in SFTP

Hi Folks, I am trying to copy a directory along with sub-directories to SFTP server. I have connected to SFTP and tried to run the below command: sftp> get -r abc/* It is throwing the error Invalid flag -r Can you please let me know the ways to copy a directory from Local to SFTP ... (1 Reply)
Discussion started by: kirans.229
1 Replies

10. UNIX for Beginners Questions & Answers

Sftp,[put] all files that are .csv to server. Linux Ubuntu

Hello all, I am trying to sftp files to a server, I am using keys as authentication and I can connect with no problems. I can also put a sample file on the server. When I tried to automate this process with a .sh file I get the "couldn't canonicalize: Failure". This is my script: sftp... (5 Replies)
Discussion started by: KidKoder
5 Replies
CGI::FormBuilder::Template::Fast(3pm)			User Contributed Perl Documentation		     CGI::FormBuilder::Template::Fast(3pm)

NAME
CGI::FormBuilder::Template::Fast - FormBuilder interface to CGI::FastTemplate SYNOPSIS
my $form = CGI::FormBuilder->new( fields => @whatever, template => { type => 'Fast', root => '/path/to/templates', # use external files define => { form => 'form.txt', field => 'field.txt', invalid_field => 'invalid_field.txt', }, # or define inline define_nofile => { form => '<html><head></head><body>$START_FORM <table>$FIELDS</table>$SUBMIT $END_FORM</body></html>', # etc. }, }, ); DESCRIPTION
This engine adapts FormBuilder to use "CGI::FastTemplate". Please read these docs carefully, as the usage differs from other template adapters in several important ways. You will need to define three templates: "form", "field", and "invalid_field". You can use "define" to point to external files (which is the recommended "CGI::FastTemplate" style), or "define_nofile"/ "define_raw" to define them inline. The templates in "define_nofile" take precedence over "define_raw", and both of these take precedence over "define". my $form = CGI::FormBuilder->new( # ... template => { type => 'FastTemplate', root => '/path/to/templates', define => { form => 'form.txt', field => 'field.txt', invalid_field => 'invalid_field.txt', }, # or, you can define templates directly define_nofile => { form => '<html><head></head><body>$START_FORM<table>' '$FIELDS</table>$SUBMIT $END_FORM</body></html>', # etc. }, }, # ... ); If you use "define" with external templates, you will probably also want to define your template root directory with the "root" parameter. Within each of the field templates, the following variables are available: $NAME # $field->name $FIELD # $field->tag (HTML input tag) $VALUE # $field->value (first value only!) $LABEL # $field->label $COMMENT # $field->comment $ERROR # $field->error $REQUIRED # $field->required ? 'required' : 'optional' All the fields are processed in sequence; valid fields use the "field" template, and invalid fields the "invalid_field" template. The result from each of these is appended into the $FIELDS variable, which you should use in your "form" template. In the "form" template, you also have access to these variables: $TITLE # title of the form $START_FORM # opening form tag $SUBMIT # the submit button $RESET # the reset button $END_FORM # closing form tag $JS_HEAD # validation JavaScript Note that since "CGI::FastTemplate" doesn't use anything other than simple scalar variables, there are no variables corrosponding to the lists that other engines have (e.g. "fields" or "options" lists in "TT2" or "Text::Template"). SEE ALSO
CGI::FormBuilder, CGI::FormBuilder::Template, CGI::FastTemplate AUTHOR
Copyright (c) 2005-2006 Peter Eichman <peichman@cpan.org>. All Rights Reserved. Maintained as part of "CGI::FormBuilder" by Nate Wiger <nate@wiger.org>. This module is free software; you may copy this under the terms of the GNU General Public License, or the Artistic License, copies of which should have accompanied your Perl kit. perl v5.14.2 2011-09-16 CGI::FormBuilder::Template::Fast(3pm)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy