I basically need to do this:
DUMMY=dummy
sudo su - ec2-user -c 'echo $DUMMY'
This doesn’t work. How can I pass the env variable $DUMMY to su? -p doesn’t work with -l.
I basically need to do this:
DUMMY=dummy
sudo su - ec2-user -c 'echo $DUMMY'
This doesn’t work. How can I pass the env variable $DUMMY to su? -p doesn’t work with -l.