Fun with do shell script

If you’re like me and want to know when you booted your Mac last, try this:

set myText to do shell script "uptime"
display dialog myText

(uptime is a unix command that gives the current time, the days/hours/minutes the system has been up, the number of users logged in (besides yourself) and the load averages for the last 1, 5 and 15 minutes (lower numbers are better–if it is near 1, then it means only 1 process is waiting to execute on average, if it’s higher, the system is running more tasks).

Also, if you have Fink (or FinkCommander) and have loaded the fortune program that gives you quotes and other random thoughts, you can create a “thought for the day” script:

set myText to do shell script "/sw/bin/fortune"
display dialog myText