I have to do something stupid, but I cannot find the current username using Julia. The closest function in Base looks like gethostname() , but returns the computer name, not the username. I tried system calls, but I'm having problems due to the $ interpolation character. In particular, although echo $USER returns the corresponding username in the terminal when I try to do the following in Julia, I get various errors or incorrect answers:
run(`echo $USER`) run(`echo "$USER"`) run(`echo '$USER'`) run(`echo '$'USER`) run(`echo \$USER`)
I think the problem is that Julia misinterprets $ as interpolation, but I have no idea how to get around this.
Any ideas?
source share