arrow_back Back to Notebook
bash
bash
January 10, 2019

How to nest commands in bash

To use nested commands in bash you can surround the child command with backticks ` or ${}

Code examples

echo "10"

10

echo "my id is: $(echo "10")"

my id is: 10

Thanks for reading!

John Wiseman

Full-Stack Software Engineer building scalable digital solutions. specializing in modern web technologies and mission-critical systems.

© 2026 Wiseman Systems Pty. Ltd.

Navigation

Start a Conversation

Ready to discuss your next project? Let's build something extraordinary together.

Get in Touch