Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to define a command bash

#define command output to a varible
myv1=$(pwd)
echo $myv1
myv2=`ls`
echo $myv2
you can use $() or `` to assing a command output to a varible
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #define #command #bash
ADD COMMENT
Topic
Name
4+5 =