Languages
[Edit]
EN

Bash - print in-script variable in command line

5 points
Created by:
Zeeshan-Peel
850

In this short article we would like to show how to print in-script variable in the command line under Bash.

Quick solution:

#!/bin/bash

variable="Some text here ..."

echo "variable: $variable";  # or:  echo "variable: ${variable}";

 

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join