Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 618 Bytes

File metadata and controls

23 lines (15 loc) · 618 Bytes

String Interpolation

I ran into some issues with string interpolation in Zsh, something basic, luckily the solution is basic.

Output a string:

FOOD="apples" && echo "I eat ${FOOD}"
I eat apples

Output a command:

FOOD="apples" && echo "I eat ${FOOD} on $(date)"
I eat apples on Tue Nov 11 19:54:11 CET 2025

Examples lifted from the references resource and modified for my own pleasure.

Resources and References