[SunHELP] Script to automate ftp.
Bashar
sunhelp at sunhelp.org
Sat Sep 15 00:48:11 CDT 2001
A small tip has been emailed long time ago from UGU.com daily tips:
--- START OF TIP ---
FTP AUTOMATED TRANSFERS
To add to the earlier tip
on automated transfer using
FTP, you can define a macro
by name 'init' which will
automate the whole transfer.
Defining the macro.
In the .netrc file after the
definition for the machine
name,add the following
definition.
macdef init
bin
hash
cd <directory>
!cd <directory>
put/get <filename>
bye
The line begining with macdef
starts the definition of a
macro.All the sub sequent
lines upto a blank line (or
end of file) are part of
the macro.
Now if you type ftp
<machine name> at the prompt,
the whole ftp will happen
automatically.
These macros can also be
defined in any other name in
which case,you will have to
type the macro name at the
ftp prompt for its statements
to get executed.
This tip generously supported by: subha at hitechclub.com
--- END OF TIP ---
KuwaitNet Communications Inc.
Bashar A AlAbdulhadi UNIX Systems Administrator
bashar at kuwaitnet.net http://www.KuwaitNet.net
Phone: (KW) +965-2647060 Fax: (KW) +965-5337060
Phone: (KW) +965-807060 Fax: (US) +801-4373934
ICQ UIN: 19907999 Pager: (KW) 9327060
IRC: Big @ #Kuwaitnet YaHoO ID: kuwaitnets
"Quality, Stability, 24 Hours Tech. Support"
"Think KuwaitNet"
On 14 Sep 2001 koyote at koyote.cx wrote:
> >Does anyone want to share some idea about how to automate a ftp session?
> >Thanks!
>
>
> it's called Expect. learn it and love it. :)
>
> -C
>
> _______________________________________________
> SunHELP maillist - SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
>
More information about the SunHELP
mailing list