net
Search this site
Home
>
unix/linux
>
bash
>
Command output to a variable
DIR="$(ls -la)"
echo " dir is $DIR"
Reference:
How to set a variable to the output of a command in Bash?
:
StackOverflow, Jan 11
Capturing multiple line output into a Bash variable
: StackOverflow, Mar 09
Comments