#!/bin/sh
# This is a comment. Comments are good.
# This is my first shell script.
echo "System Status Report"
date
echo -n "System uptime and load:"
; uptime
echo -n "Operating System: " ; sysctl -n kern.ostype
echo -n "OS Version: " ; sysctl -n kern.osrelease
echo -n "OS Revision number: " ; sysctl -n kern.osrevision
echo -n "Hostname: " ; sysctl -n kern.hostname
bytes=`sysctl -n hw.physmem`
megabytes=`expr $bytes / 1024 / 1024`
echo "Physical memory installed
(megabytes): $megabytes"
-n
an argument or an option?$bytes
and $megabytes
mean in the last two lines?Previous - Opening
Files from the Command Line |
Next
- Take a short break |
|
Home |