Que tal:
uptime | grep user && echo 'yes' || echo 'no'
uptime | grep foo && echo 'yes' || echo 'no'
Então você pode ficar quieto:
uptime | grep --quiet user && echo 'yes' || echo 'no'
uptime | grep --quiet foo && echo 'yes' || echo 'no'
Na página de manual do grep:
EXIT STATUS
Normally, the exit status is 0 if selected lines are found and 1 otherwise. But the exit status is 2 if an error occurred, unless the -q or --quiet or --silent option is used and a selected line is found.