Files
mastering-unix-ss/chapter17/function_get_OS_info
Fabio Scotto di Santolo 4cc88d2f6e initial commit
2020-07-28 19:28:25 +02:00

12 lines
346 B
Plaintext
Executable File

function get_OS_info
{
# For a few commands it is necessary to know the OS and its level
# to execute the proper command syntax. This will always return
# the OS in UPPERCASE
typeset -u OS # Use the UPPERCASE values for the OS variable
OS=`uname` # Grab the Operating system, i.e. AIX, HP-UX
print $OS # Send back the UPPERCASE value
}