# Input, Quotes and Values

Give a script something to work on, ask the user questions, and build values from other commands.

Updated: November 10, 2026

## [Input](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-input)

1. [Arguments: $1, $# and "$@"](https://www.ask-codey.com/lessons/bash-script-arguments) (Apprentice): The words typed after a script's name are its arguments: $1 is the first, $2 the second, $# says how many there are, and "$@" hands all of them on, each in one piece.
2. [Asking Questions: read](https://www.ask-codey.com/lessons/bash-reading-input) (Apprentice): read waits for the user to type a line and keeps it in a variable: -p shows a question first, -s hides what's typed, and ${name:-default} gives an answer that was left empty a default.

## [Values](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-values)

1. [Quotes: Double, Single and None](https://www.ask-codey.com/lessons/bash-quoting) (Journeyman): Without quotes, the shell splits a variable's value at its spaces and turns a \* into file names, the number-one bash bug; "$name" in double quotes keeps the value exactly as it is, and single quotes keep everything as typed.
2. [Values from Commands: $( ) and $(( ))](https://www.ask-codey.com/lessons/bash-command-substitution) (Apprentice): $( ) runs a command and puts what it prints into another command or a variable, such as today's date in a backup's name, and $(( )) works out whole-number arithmetic, such as an age or a count plus one.

## [Exercise: The Greeting Card Maker](https://www.ask-codey.com/courses/bash-in-depth/topics/exercise-bash-the-greeting-card-maker)

1. [Exercise: The Greeting Card Maker](https://www.ask-codey.com/lessons/exercise-bash-the-greeting-card-maker) (Apprentice): Finish card.sh, a small application that takes a name as its argument, asks for a greeting and a signature, and saves a dated, numbered card, then fix its quoting bug and let a check script run it for real.

Source: https://www.ask-codey.com/courses/bash-in-depth/chapters/bash-input-quotes-and-values
