I have a script that requires setting the env USER variable. Since the script is used by several users, I cannot just do export USER=xxx at the beginning of the script. I could define in crontab , but I'm just wondering if there is a good way to pull it.
I tried sourcing .bashrc and .profile , but none of them defines USER, and Ubuntu .bashrc just returns to non-interactive shells.
source share