The program I am running needs root privledges and therefore is run with sudo, but it also needs to know what user is running it. getuid and
sudo
getuid
The easier way would be using Who am i
who am i | awk '{print $1}'
or
who am i | cut -f1 -d" "