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
7 months agoLawanda
7 months agoTammi
7 months agoShannan
7 months agoSage
8 months agoMerilyn
8 months agoRolande
8 months agoCarolynn
8 months agoDean
8 months agoWhitley
8 months agoValentin
8 months agoWilford
8 months agoLeonor
8 months ago