Contrived example:
#!/usr/bin/bash
MYVAR=$(cat /somedir | grep -i myval)
Now I want:
#!/usr/bin/bash
BASEDIR=/somedir
MYVAR=$(cat [BASEDIR?] | grep -i myval)
How should variable be passed to subshell?
Contrived example:
#!/usr/bin/bash
MYVAR=$(cat /somedir | grep -i myval)
Now I want:
#!/usr/bin/bash
BASEDIR=/somedir
MYVAR=$(cat [BASEDIR?] | grep -i myval)
How should variable be passed to subshell?