# Values from Commands: $( ) and $(( ))

$( ) 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.

![Cheat sheet for the lesson Values from Commands: $( ) and $(( )): $( ) 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.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/9926f6157ae942dc983072522f2a769f.webp)

- Category: Bash
- Level: Apprentice
- Tags: arithmetic-expansion, command-substitution, date, linux, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-command-substitution-cheat-sheet
