Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 11:18 on June 26, 2006


[Overall] automated FTP script switch

Some people often asked to see shell version of the automatic FTP, in order to once and for all, I, I wrote a shell script automatically FTP stickers out, in principle, can be used under all UNIX/LINUX.
Script in HPUX11.00, sh through.
The use of simple, shell Kaodao part of the function of your catalog, using the former to stress on the list. What has not changed.

I improved the procedure, the downstairs all the problems did not exist.
[code]
#!/bin/sh
#functions.ftp
#usage:func_ftp IP addresses of users who passwords local transmission list distal Document Upload or download catalog
#func_ftp IP username password local_directory remote_directory filename [asc/bin] [put/get/mput/mget]
#Example:func_ftp 192.168.1.2 root root /etc /tmp/etc hosts put asc
# Process parameters, the use of long-range attention to the end of catalogs and catalog, get and put the difference. The above example is from the local to the list /etc
Remote server 192.168.1.2 # /tmp/etc a list of ways to use uplink ASC code (put way) hosts文件.
#designed By HAWK.Li
#version 1.2
#fixed 2004-12-17

Func_ftp () (
Cd $ 4
N $ /usr/bin/ftp -i "<EOF
User $ 2 $ 3
$7
Cd $ 5
Prompt off
$8 $6
By
EOF
}

[/code]

[Overall] automated FTP script switch

Support!

[Overall] automated FTP script switch

Support cream! Em02 : :

[Overall] automated FTP script switch

Shell is a beginner, can you explain to you some of the procedures step by step
Shell Lane for the parameters still do not know where these symbols to explain clearly the (No.)

[Overall] automated FTP script switch

See Zhiding "<shell 13 Questions" "

[Overall] automated FTP script switch

!

[Overall] automated FTP script switch

Get proposal, also put parametric

[Overall] automated FTP script switch

EOF what is the meaning

[Overall] automated FTP script switch

EOF End Of File is actually anything, not just my own definition of a representative of characters end, you can use it to replace the arbitrary character.
Get put parameters of the trip-have you ever thought of using, but long enough to the original parameters, but users will not get used to put separate is not bad.
With this script, and forums on the issue should be automatic FTP all exterminated. Fully automated, do not change anything.

[Overall] automated FTP script switch

This procedure is a specific need on your catalog?
You still need to process real input function is $
Furthermore, the mode of operation is a step in the # import directly, or religious

[Overall] automated FTP script switch

Haotie, harvests

[Overall] automated FTP script switch

This ftp script, and I remember that there are many CU; )

[Overall] automated FTP script switch

-->

[Overall] automated FTP script switch

The way to write the application.
You do not need know.

[Overall] automated FTP script switch

Automatic ftp seems not call for or while inside.
What are the reasons?

[Overall] automated FTP script switch

Solaris8 testing under a lot of successful examples : : (first test of ping)
FtpCheck=`ping 192.168.0.102 5`
Echo $ftpCheck
FtpLine=`echo $ftpCheck | grep alive | wc -l`
[1] then if $ftpLine -ne
Exit 0
Else
For i in BSCGPRS NECELHO; do
Ftp -n<<!
Open 192.168.0.102
User zeales zeales
Lcd /export/home/zeales/backup
Cd /export/home/zeales/tmp
Asc
Prompt
Mget *$i
Close
By
!
Echo "******$i done******"
Done
Fi
# Ftp on the conditions which must be in the forefront

[Overall] automated FTP script switch

For/while could ftp such as recycling, such as :
For/while. . .
Ftp. . .
Done

[Overall] automated FTP script switch

It must close
Otherwise, not success.

[Overall] automated FTP script switch

UNIX is the use of different reasons, it seems to be changed automatic FTP, add close.
In a wide range of mainframe try.

[Overall] automated FTP script switch

-->
In the second sentence of operation. Functions_ftp.sh when suggest syntax error : 'end of file' unexpected
The third sentence is not found
But I was into the complicated system. Why is there such a grammatical error suggest?



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com