I have a script which executes a git-pull when I log in. The problem is, if I su to a different user and preserve my environment with an su -lp, the script gets run again and usually gets messed up for various reasons because I m the wrong user. Is there a way to determine in a shell script whether or not I m currently SUing? I m looking for a way that doesn t involve hard coding my username into the script, which is my current solution. I use Bash and ZSH as shells.
I m attempting to write a bash script to parse out the following log file and give me a list of CURRENT players in the room (so ignoring players that left, but including players that may have rejoined)...