![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UNIX logon script/batch | oht | UNIX for Dummies Questions & Answers | 1 | 09-05-2007 03:04 PM |
| Logon script | capeme | UNIX for Dummies Questions & Answers | 4 | 12-06-2006 07:58 AM |
| Default ALOM username and password for the Sun servers | muthulingaraja | UNIX for Advanced & Expert Users | 1 | 10-11-2006 07:37 AM |
| umask setting on a logon script | karthikosu | AIX | 2 | 06-22-2006 09:38 AM |
| ASCII character to accept logon password | gord | UNIX for Dummies Questions & Answers | 8 | 02-02-2006 12:58 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hey..
I am new in scripting.. I know a little bit of scripting.. I am facing some problem.. I need to create a script using which I may log on to a server (e.g. ftp) with ID and password.. thus copy a particular file to a local dir.. the commands required to do that I do know.. I am able to do it manually.. Can any one please inform me in detail how may I do it using a script?? the problem i am facing is the input of username and password using the script.. and secondly how may I run or execute a script at a particular time every day.. actually I need to copy a file using ftp everyday at 4PM.. and I need to do it using script.. please help me to do that.. With thanks and regards AL MAMUN MAHBUB |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Not sure why you did not google this, but something like follows is what you are looking for,
#!/bin/sh HOST='ftp.users.qwest.net' USER='yourid' PASSWD='yourpw' FILE='file.txt' ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE quit END_SCRIPT exit 0 taken from, Using ftp in a shell script |
|||
| Google The UNIX and Linux Forums |