![]() |
|
|
|
|
|||||||
| 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 |
| To call/execute a shell script from a shell script | konark | UNIX for Dummies Questions & Answers | 1 | 10-26-2007 02:16 PM |
| How to pass a parameter from one Shell-script to another Shell-script | subodhbansal | Shell Programming and Scripting | 2 | 09-22-2007 02:19 AM |
| How to Run a shell script from Perl script in Parent shell? | hifake | Shell Programming and Scripting | 16 | 08-28-2007 05:42 PM |
| Accessing variables of one shell script in another shell script | rsendhilmani | Shell Programming and Scripting | 1 | 04-30-2007 05:43 AM |
| Have a shell script call another shell script and exit | heprox | Shell Programming and Scripting | 2 | 11-20-2006 05:17 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 & password to this code ? Thk Last edited by aungomarin; 05-09-2006 at 12:11 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
edit .netrc file at your home directory ,add code like this:
machine 192.168.0.1 login myusr password 123 save it,then chmod 600 .netrc ps:192.168.0.1 is destination address myusr is your login name 123 is your password |
|
#3
|
|||
|
|||
|
or get userid/password before starting ftp (not for insecure environments as password is visible):
Code:
#!/bin/sh read uid?"UserId: " read pwd?"Password: " echo "Start ftp" ftp -n temphost <<EOF user $uid $pwd put file quit EOF # end |
|
#4
|
|||
|
|||
|
would you mind using expect/autoexpect command?
it's a shell script isn't it? it's really useful for interactive programs.... worth a try..... |
|
#5
|
|||
|
|||
|
Thks all very much for answer
|
|
#6
|
|||
|
|||
|
Dear Friends,
Please Let me know which .netrc file should I edit either in my home directory of in the destination home directory. I need to know the idea of .netrc file. I really misunderstand it. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Actually what I'm doing is the following: 1. I have 192.168.30.151 unix server 2. I have 123.123.130.200 unix destination server. 3. I need to ftp auto. from server No. 1 to destination server. How can I make this in detail. please . |
|
#7
|
|||
|
|||
|
Sorry guys. I've understood what you have written. and I'm totally great full for your efforts and excellent ideas. thanx again and again.
|
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|