Re: Script to run Wine and save log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 24, 2009 at 5:18 PM, Martin Gregorie<martin@xxxxxxxxxxxx> wrote:
> 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"

Will break like I said above...just use:
if [ "`uname -s`" = Linux ]
then
....
fi

> 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.

Right.

-- 
-Austin



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux