I'm looking for a shell command in unix that has a non zero output that is uniform across all unix platforms (for example will allways return 1 on a unix system) and also has no (or zero value) output in windows.
I tried (in unix):
sh echo 1
but this returns:
cannot execute binary file
using
echo 1
would not fit this criteria since it produces an output in windows as well as unix.
uname
seems to work on a lot of systems. Example: # uname -> FreeBSD. On another computer: #uname -> Linux