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