On Wed, 2009-06-24 at 16:38 -0500, Austin English wrote: > uname is portable, and should work everywhere. What's *not* portable, > is, e.g., grepping uname for answers, e.g.,: > `uname -a` | grep Linux > Yes, I've seen this done. But what happens if you're on a *BSD box > with the hostname 'Linux_sucks'. > I think this is portable: uname -a |grep -i "^linux" Another thought: how portable is this? if [ -f /proc/version ] then grep -i "^linux" </proc/version fi AFAIK it should work in all Linuxes with kernel 2.6. Minor point: I think all unices have the Bourn Shell but not all have ksh, csh or bash, so the #!/bin/sh line is probably a good idea. Martin