I have a shell script in which the line
if [ $ARCH = "Solaris" ]
then ...
This variable was not set on a Solaris machine and caused
some problems. Can I check something else?
The existance of /vmunix?
Shawn.
I have a shell script in which the line
if [ $ARCH = "Solaris" ]
then ...
This variable was not set on a Solaris machine and caused
some problems. Can I check something else?
The existance of /vmunix?
Shawn.
Try looking at the output from "uname -r" and see if you can
make a test from that.
Quote:>I have a shell script in which the line
>if [ $ARCH = "Solaris" ]
> then ...
>This variable was not set on a Solaris machine and caused
>some problems. Can I check something else?
>The existance of /vmunix?
>Shawn.
> I have a shell script in which the line
> if [ $ARCH = "Solaris" ]
> then ...
> This variable was not set on a Solaris machine and caused
> some problems. Can I check something else?
> The existance of /vmunix?
> Shawn.
if [ "`uname -r | awk -F. '{print $1}'`" = "5" ] ; then ... ; fi
Andrey
|I have a shell script in which the line
|
|if [ $ARCH = "Solaris" ]
| then ...
|
|This variable was not set on a Solaris machine and caused
|some problems. Can I check something else?
Try using the output of uname. On SunOS / Solaris, `uname` will
be "SunOS" (as opposed to something like "AIX", "HP-UX", etc.),
and `uname -r` will give a version number like "4.1.3_U1" or "5.5.1".
--
------------------------------------------------------------------------
Unsolicited bulk or commercial email is not welcome. netcom.com
No warranty of any kind is provided with this message.
...unless you also want this script to work on, say, IRIX 5.x and don'tQuote:>You probably can do
>if [ "`uname -r | awk -F. '{print $1}'`" = "5" ] ; then ... ; fi
You really want to look at "uname -s" as well, e.g. doing "uname -sr"
and looking for "SunOS 5.*" if you want to see whether you're on Solaris
2.x (and "SunOS 4.*" for Solaris 1.x).
> I have a shell script in which the line
> if [ $ARCH = "Solaris" ]
> then ...
> This variable was not set on a Solaris machine and caused
> some problems. Can I check something else?
Hope this helps
--
======================================================================
Dan Abarbanel | "Warning: Dates in the calendar are
Madge Networks ESD, Israel | closer than they appear!"
Tel: +972 3 6457662 |
Fax: +972 3 6487146 |
1. Process id of parent shell from shell script
Hi,
$$ gives process id of current shell. How to get process id of parent
shell.
Thanks
Sujit
3. Switching id bourne shell...
5. id like some basics about using my unix shell account
7. Checking user ID in shell scripts
8. Konqueror and slow (bad) network connection.
9. Change process group id using korn shell
10. Can shell set effective group id?
11. Execing a process from .profile which inherits the process id of shell?
12. Set User-ID bit on Shell Script?
13. changing user id inside a shell script