What distro are you using? I've never seen anyone refer to
open being an alias for ftp.
Quote:
According man ftp interprets a $ as a macro. I just want to know if it is possible to pass a variable to ftp in bash.
|
And this is where my suggestion comes in. If you use
ftp $variable the variable will be expanded BEFORE ftp
is run. And if you put the credentials and the commands
into your .netrc you're sweet.
The other approach would be to use expect instead, but
I think my suggestion is easier (and in this case probably
more elegant, too). What you need to understand is that
as soon as you pass control to the ftp process shell variables
aren't working any more.
Another approach would be to echo the whole sequence of your
commands to ftp, but again, I think that .netrc is more elegant.
Cheers,
Tink