Mailinglist Archive: opensuse (3513 mails)

< Previous Next >
Re: [opensuse] BASH help - Better way to test if remote host running openSuSE or windows?
  • From: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
  • Date: Sun, 11 Jan 2009 22:50:54 -0600
  • Message-id: <496ACC2E.8030101@xxxxxxxxxxxxxxxxxx>
Andrew Joakimsen wrote:
One problen I see already is if the server is running PNAELV or CentOS
the file is /etc/redhat-release. Your script would say that server is
running Windows.

If you just want to see if the server is running any sort of Linux,
the output of the uname command might be apropriate (see the
manpage... I thing there is a switch that retuens just the phrase
"Linux"). A Windows host with cygwin might even report the windows
version (I never tested, I don't use Windows anymore.)


Thanks Carlos and Andrew,

Since this is just for me, I know the box will be openSuSE, but if I
did want
it more generic, I could see how uname and awk or just grep on Linux would work
as well. I'll keep pecking around, but at least it's working regardless of
elegance right now...

--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
This Thread
References