I'm trying to set a shell variable to $PWD - the path from were the script is executed. This is what I have, setenv.sh:
#!/bin/bash
export WORK_AREA=$PWD #also tried "$PWD", $(pwd), `pwd`
But when I run from the shell
> ./setenv.sh
> echo $WORK_AREA
WORK_AREA has no value
. ./setenv.sh
– cuonglm Oct 24 '17 at 16:18