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