which netcat uptime brew

//Output

/bin/netcat
/usr/bin/uptime
brew not found //(or appropriate response depending on your shell - could also return a blank line)