>> 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.
>> open miso.wwa.com
>> Other commands
>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:
>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
>> That does not work
>> Can someone please help me
>> Please e-mail me.
It sounds like what you need is a .netrc file. THe .netrc would like like this:
user your userid your password
Since your password is in the .netrc, be sure to restrict the permissions.
Then when you ftp the command would be:
ftp -nv < .netrc