You didn't indicate which operating system. Here is a AIX/KSH script to prompt for and change a node password.
#!/usr/bin/ksh print "" print "Dialog to change a NODE password." print "" print "Please enter a node name, or partial node name. I'll do a lookup on it for you!" read Inode print "" print "You entered $Inode , performing lookukp . . . " /tsmdata/tsm_scripts/q_node.ksh $Inode print "" print "There, it should be one of the above. " print "Please enter the FULL NODE NAME from above." Inode="" read Inode print "" print "The node we are going to change is $Inode" print "" print "Please enter the TSM instance of the node." read Itsm print "" print "The node is in $Itsm" print "" print "Please enter the new password." read Ipwd print "" print "TODO: chg pwd for node= $Inode tsm= $Itsm newpwd= $Ipwd" print "type \"ok\" to proceed" read Iok if [[ $Iok == 'ok' ]]; then print "" print "performing change . . . " /tsmdata/tsm_scripts/run_cmd.ksh $Itsm "update node $Inode $Ipwd" print "" print "all done!!!!" else print "" print "terminating" fi -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ADSM-L@VM.MARIST.EDU] On Behalf Of Robert Ouzen Sent: Monday, September 07, 2015 9:48 PM To: ADSM-L@VM.MARIST.EDU Subject: Script question Hi to all Anybody have an example for during a script , asking for a parameter. Waiting for the input and after pass the parameter to a command For example something like this: "Please enter the process number $1 " Waiting ........... can pr $1 Best Regards Robert ----------------------------------------- The information contained in this message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately, and delete the original message.