>> I want to Pass an argument to a unix command.
>> For example. I get the shell script to go to FTP by just typeing FTP in
>> the Script. Then I want the script to execute one of the commands in FTP
>> But I can't get it to work.
>> An example script that I made.
>> #!/bin/sh
>> ftp
>> open miso.wwa.com
>> Other commands
>> quit
>You need what is called a 'here document'. Each line in your script
>above is taken as a shell command, which is not what is required.
>Here is an example based on your script:
>#!/bin/sh
>ftp<<-EHD
>open miso.wwa.com
>Other commands
>quit
>EHD
>All text between the <<-EHD and EHD is taken as stdin to ftp. EHD can
>be any string. The hyphen ('-') allows you to indent text in between
>the 'labels' (with TABS only). The end label must be on a line by
>itself.
>> That does not work
>> Can someone please help me
>> Please e-mail me.
>Luck!
>--
>Tony Sequeira
--
It sounds like what you need is a .netrc file. THe .netrc would like like this:
open miso.wwa.com
user your userid your password
Other commands
quit
Since your password is in the .netrc, be sure to restrict the permissions.
Then when you ftp the command would be:
ftp -nv < .netrc
Kenny Whitaker