Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash execute command in variable

# There are 2 way to store the STDOUT of a command in a variable
result=$(echo "Hello World")

# The second way to do it
result=`echo "Hello World"`
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #execute #command #variable
ADD COMMENT
Topic
Name
3+8 =