Sponsored Content
Full Discussion: Need a Shell Script for FTP
Top Forums Shell Programming and Scripting Need a Shell Script for FTP Post 302925477 by maruf on Monday 17th of November 2014 11:51:20 AM
Old 11-17-2014
Need a Shell Script for FTP

Hi,

Noted with thanks
Below is the values of the some variables
Code:
FILE='XXXX.*' [get multiple file]
SrcDir='D:\TEST\' [Windows PC]
DstDi='/tmp/' [Linux Pc]

Thanks

Last edited by vbe; 11-17-2014 at 01:06 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using ftp in a shell script.

I am trying to ftp some files from a certain directory, but i got an invalid command. does anybody know why i got this error? ftp -v -i -n <<SCRIPT open servername user username password cd /server/logs for file in MCWAS* do put ${file} /home/test/${file} done bye SCRIPT (2 Replies)
Discussion started by: caesarkim
2 Replies

2. Shell Programming and Scripting

ftp in shell script

Hi, I have to ftp to a remote machine. i have got the Ip, username and password and the file path.. I need to get the file name with out user intervention in my script.. is there any way to do this.. please help esham (2 Replies)
Discussion started by: esham
2 Replies

3. UNIX for Dummies Questions & Answers

Shell script for ftp

Hi ,, I am wrting a shell script to ftp a file from remote server but its giving some problem to me.can you help me in debugging this. #!/usr/bin/ksh HOST="some ip" user="user_name" passwd="password" ftp -n $HOST >>END_SCRIPT USER $user $passwd binary prompt get... (3 Replies)
Discussion started by: namishtiwari
3 Replies

4. Shell Programming and Scripting

FTP via shell script

Hi, I need to upload a file via ftp. I have given : ftp -n $HOST <<END quote user $USER quote pass $PASSWD prompt off put bus.txt quit END Its throwing a syntax error at "<<" symbol. What should be done for this ?? (2 Replies)
Discussion started by: risshanth
2 Replies

5. Shell Programming and Scripting

ftp with shell script

Can I ftp to put file with shell script(as bath file) ? Plz give the simple code to do that. My script look like that #!/bin/sh echo "Start ftp" ftp temphost <<EOF put file quit EOF # end This code ignore username & password but I need to input. How to input username &... (8 Replies)
Discussion started by: aungomarin
8 Replies

6. UNIX for Advanced & Expert Users

FTP in shell script

HI ALL i am writing a shell script in which i have to use FTP command like. FTP <ip address> cd xyz mget* bye but i am not able to perform any command from shell script. once the control goes to FTP, i again have to type all the things. i just want my shell script to take care of the... (8 Replies)
Discussion started by: infyanurag
8 Replies

7. Shell Programming and Scripting

Help with Shell script for FTP

#!/usr/bin/ksh export filename=/grid/PowerCenter/inbound/AT/filelist.txt export SOURCE_DIR=/grid/PowerCenter/inbound/AT export ICOMS_FTP_TGT_DIR1=/dw/input/ATU/ICOM_SERV1 export ICOMS_FTP_TGT_DIR2=/dw/input/AT/ICOM_SERV2 export FILE_MASK="ATRPU_RP_ATU" echo "start" ftp_data_file() { ... (15 Replies)
Discussion started by: vsmeruga
15 Replies

8. Shell Programming and Scripting

FTP within a SHELL script

I am running the following on linux (on a mac): filename="/Users/thisfilename.txt" hostname="ftp.mysite.com" username="myusername" password="mypassword" echo '=======FTP========' ftp -un $hostname <<EOF quote USER $username quote PASS $password binary put $filename quit EOF I... (4 Replies)
Discussion started by: globalnerds
4 Replies

9. Shell Programming and Scripting

Help With FTP Shell Script

So i Administer multiple ftp servers that run on dynamic IP's as well as user and password settings are changed by other people constantly. What i need to do is ensure that an FTP is server is up on the IP i check. As well as the login credentials work. Here is a simple script i wrote. However... (2 Replies)
Discussion started by: Noledge
2 Replies

10. UNIX for Dummies Questions & Answers

FTP in Shell Script

Dear All, I am using FTP in a script. But when i exit from the FTP session, the commands written after EOF don't get executed. i.e. ftp <<EOF quote $login quote $password cd /tmp mget *somefile* bye EOF echo $some_variable #This last echo command or whatever piece of commands i... (10 Replies)
Discussion started by: Salman786
10 Replies
PERLKO(1)						 Perl Programmers Reference Guide						 PERLKO(1)

NAME
perlko - PerlX XXX XXX DESCRIPTION
PerlX XXX XX XX XXXXX ! PerlX 5.8.0XXX XXXX/ISO 10646X XX XXXX XXX XXX. XXXX XXX XXXX XXXX XXX XX XXXX XXXX XXX XX XXX XXX XX XXX XX XXX XXXX XXXXX. XXXXX X XXXX XXX XX XXX XX XX XX - XXX XX XXX, XX XXX, XXX XXX, XXX XX XXXX XXX XX XXXX, XX XX, XXX XX, XXXX XX, XXXX XX, XXXX XX, XX XXXX XX XX X-X XXXX XX XXX XX XX XXX XXX XXX X XX X XX XXX XX XXX XXX XX XXX XXXX X X XX XX XXX XXXX XX XX XXXX XXXX XX XX XX XX XXX XXXX XXXX. PerlX XXXXX XXXXX XX XXX XX XXXXX. XX XXXXX XXX Perl XXXX XXX UTF-8 XXXX X X XX, XX XXX XXX(XX XX, XXX, index, substr)X XXX XX XX XXXX XX XXX XXXXX. (X XXX XX perlunicode XXXX XXXXXX.) XXXXX XX XXXX XX XX XXX XXX, XXX XX XXX XX XX/X XXX XXXXX XXXX XX XX XXXXX X XXXX XXX XXX XX XX XX 'Encode'X XXXXX. XXXX 'Encode'X XX XXX XXX XXX XXX XX X X XXXX. 'Encode'X XXX XX XXX XXXX XXXXX. euc-kr US-ASCIIX KS X 1001X XX XX XXXXX XXX (XX XXXXXX XX.) KS X 2901X RFC 1557 XX. cp949 MS-Windows 9x/MEXX XXX XX XXX. euc-krX 8,822XX XX XXX XX XX. aliasX uhc, windows-949, x-windows-949, ks_c_5601-1987. X XXX XXX XXXX XX XXXXX, Microsoft XXXX CP949X XXX XXX XX. johab KS X 1001:1998 XX 3XX XXX XXX. XX XXXXX cp949X XXXXX US-ASCIIX KS X 1001X 8,822XX XX XXX XX XX. XXX XXX XX XX. iso-2022-kr RFC 1557XX XXX XXX XXX XX XXX XXXXX US-ASCIIX KS X 1001X XXXXX XX XXX euc-krX XXX XXX XXX XX. 1997-8X XXX XXXX X XX XX XXX XXX XX. ksc5601-raw KS X 1001(KS C 5601)X GL(X, MSBX 0XX X XX) X XXX XX XXX. US-ASCIIX XXXX XX XXXX XXX XX X11 XXX XX XXX (ksc5601.1987-0. '0'X GLX XXX.)XX XXX XX XXXXX XX XX. KS C 5601X 1997X KS X 1001X XXX XXXX. 1998XXX X XX (XXX XXX XX XX XX)X XXXX. X XX XX XXX XXX XXXX. XX XX, euc-kr XXXXX X XXX UTF-8X XXXXX XXX XX XX XXX. perl -Mencoding=euc-kr,STDOUT,utf8 -pe1 < file.euckr > file.utf8 XXXX XXX XX X X XXXX. perl -Mencoding=utf8,STDOUT,euc-kr -pe1 < file.utf8 > file.euckr XX XXX XX XXXX X X XXX Encode XXX XX XXXX PerlXX XX piconvX PerlX XX XXXX. X XXXX X X XXX piconvX UnixX XX iconvX XXX X XXXX. X XXXX XXX XXXX. piconv -f euc-kr -t utf8 < file.euckr > file.utf8 piconv -f utf8 -t euc-kr < file.utf8 > file.euckr X, 'PerlIO::encoding' XXX XX XXX XXXX XXX XX XX (XXX XXX XXX) XXX XX X X XXXX. #!/path/to/perl use encoding 'euc-kr', STDIN => 'euc-kr', STDOUT-> 'euc-kr', STDERR=>'euc-kr'; print length("XX"); # 2 (X XXXX XX XX XXX XX) print length('XX'); # 4 (XX XXXX XXX XX XXX XX) print index("XX, XXX", "X"); # -1 ('X'X XX) print index('XX, XXX', 'X'); # 7 (8XXX 9XX XXXX 'X'X XXXX XXX.) X XXX XX XXX... PerlX XXXX XXX XXX XXX XX XX XX, X XXX XX Perl XX X XXX XXXX XX, EncodeX XXX XX XX XX XX X XXXX. XX X XXX XX XX XXX XX XXXX. Perl XX XX XXX XXX XX XXX XXX XX XXX XXXX. X XXX XX XXX XX XXX XX XXXX XX XX XXXX. <http://www.perl.com/> O'ReillyX Perl X XXX <http://www.cpan.org/> Comprehensive Perl Archive Network <http://lists.perl.org/> Perl XXX XXX. XX XXX XXX perl-unicodeXX 'Encode'X XX XXX. PerlX X XX XXXXX XXX X X XX XXX XX XXX <http://www.perl.or.kr/> Perl XX XXX XX <news:han.comp.lang.perl/> XXX Perl XX XX <http://www.hanb.co.kr/search/searchResult.php?keyword=perl> O'ReillyXX XX XXX Perl XX XX <http://www.perlschool.net/> Perl XX XX X XX, XX XX, XX XX XXX XX <http://www.perl.co.kr> PerlX XXX CGI, DB, XX XX XX XX X XX XX XXXX X XXX XXX XX XX <http://www.unicode.org/> XXXX XXXX. <http://std.dkuug.dk/JTC1/SC2/WG2> XXXXX UnicodeX XX ISO XXX ISO/IEC 10646 UCS(Universal Character Set)X XXX ISO/IEC JTC1/SC2/WG2X X XXX. <http://www.cl.cam.ac.uk/~mgk25/unicode.html> XXX/XXXXX XXXXX UTF-8 XXX XX XXX(FAQ) http://kldp.org/Translations/html/UTF8-Unicode-KLDP/UTF8-Unicode-KLDP.html <http://kldp.org/Translations/html/UTF8-Unicode- KLDP/UTF8-Unicode-KLDP.html> XXX/XXXXX XXXXX UTF-8 XXX XX XXX(FAQ)X XXX XX SEE ALSO
Encode, Encode::KR, encoding, perluniintro, perlunicode AUTHORS
Jarkko Hietaniemi <jhi@iki.fi> XXX <jshin@mailaps.org> perl v5.12.1 2010-04-26 PERLKO(1)
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy