input command

Summary

This command will ask the user a question, and the user has to write the answer.

Description

This command can be used in shell scripts to ask the user a specified question, which has to be answered using text. It will them pass the answer to the specified $variable.

Command usage

  • input <$variable> <question>

Examples

  • input $answer What's your name?: Asks the user this question, and the answer will be passed to $answer.

Last updated