Set
S=2
then,
echo $S = echo "$S"=
bash -c " echo $S " =
bash -c " echo '$S' " =
bash -c " echo "$S" "
the most confusing one for me is bash -c " echo '$S' "
since echo '$S' = $S
How bash -c " echo '$S' " works like others?
Set
S=2
then,
echo $S = echo "$S"=
bash -c " echo $S " =
bash -c " echo '$S' " =
bash -c " echo "$S" "
the most confusing one for me is bash -c " echo '$S' "
since echo '$S' = $S
How bash -c " echo '$S' " works like others?
echocommands are different ways of doing the same thing, outputting the value of theSvariable tostdout, normally the terminal display. – Brian Aug 25 '21 at 23:57