is_osid
Package: WA2L/edrc 1.5.57
Section: Library Commands (3)
Updated: 24 March 2009
Index
Return to Main Contents
NAME
is_osid - check if this is a certain Os-Id
SYNOPSIS
edrc/lib/is_osid
[
-h
]
is_osid
[
-n
][
-s scriptname
]
-o osid_list
is_osid
[
-s scriptname
]
-o osid_list
AVAILABILITY
WA2L/edrc
DESCRIPTION
evaluate if the operating system id
returned by
osid(3)
matches to one os-id specified by the
-o
option. This command is used to limit a script
execution to supported operating systems only.
OPTIONS
- -h
-
print usage message.
- -n
-
no message output, if the operating system id
of the system where the
is_osid
command is running is not listed in the
osid_list.
- -s scriptname
-
scriptname to print in the message output. In a
script this setting is normally set to
$0.
- -o osid_list
-
comma separated list of
osid(3)
that are allowed to run the command.
ENVIRONMENT
-
EXIT STATUS
- 0
-
OS is in OS-Id list.
- 2
-
OS is not in Os-Id list (OS not supported).
- 4
-
usage printed.
FILES
-
EXAMPLES
- 1) check if osid is HP-11 or HP-11i
-
is_osid -s $0 -o HP-11,HP-11i || exit $?
- 2) check if osid is Solaris or HP-*:
-
is_osid -s $0 -o Solaris,HP-* || exit $?
SEE ALSO
edrcintro(1),
osid(3),
uname(1)
NOTES
-
BUGS
-
AUTHOR
is_osid was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2009
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 08:38:21 GMT, December 12, 2024