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