I'm extremely lazy, and prefer to write scripts to automate compiling software. To me, as these scripts can get quite long, it's easier to run them as root but have the individual software compile as an unprivledged user (thus sudo -u). I've been able to do this in the past, but am hitting a problem now in that the conditionals aren't being evaluated. Thus, something like:
sudo -u name if [ ! -f $HOME/file ];then echo "file not found";fi
chokes on me ... right at the
then. How can I fix this?