The file script.sh in the current directory contains the following content:
#!/bin/bash echo $MYVAR
The following commands are used to execute this script:
MYVAR=value
./script.sh
The result is an empty line instead of the content of the variable MYVAR. How should MYVAR be set in order to make script.sh display the content of MYVAR?
Hayley
8 months agoLawanda
9 months agoTammi
9 months agoShannan
9 months agoSage
9 months agoMerilyn
9 months agoRolande
9 months agoCarolynn
9 months agoDean
9 months agoWhitley
9 months agoValentin
9 months agoWilford
9 months agoLeonor
10 months ago