shell CGI script

Hi there,

I am new to scripting, please advise.

I have a script running on the PC server, the script is to log on some ip to get something.
script-name IP -l username

after running the command, I need to type the password for the script to run.

Now, I like to change the script to web cgi script, I can get the IP from the web page, hardcode the uername, but not sure how to give the cgi script the password for the script to run.

any example?

Without seeing the script, it's difficult to say what you need to do.

This is often difficult because of the way most login systems read from the terminal, not standard input. You may need to use the expect language.

Of course, if noninteractive methods like ssh keys can be used, that would be ideal.