#!/bin/sh # DarwinActiveLocation.sh # 2009-04-01 # Chieh Cheng # http://www.CynosureX.com/ # GNU General Public License (GPL) Version 2, June 1991 tempFile=`GetTempPathName.ksh "${scriptName}"` system_profiler > "${tempFile}" pos=`cat "${tempFile}" | grep -n "Active Location: Yes" | Tokenize.sh ":" | Token.sh 1` loc=`expr ${pos} - 2` cat "${tempFile}" | body ${loc} ${loc} | sed "s/:$//" | TrimWhiteSpace.sh rm "${tempFile}"