Getting user input

Here is a script that collects user data:

bash
#!/bin/bash # Prompt the user for their name read -p "Enter your name: " name # Display the name echo "Hello, $name"

This script uses the read command to get input.