Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Friday, August 29, 2014

Monitor Temperature in Mac using bash script command line

The code is simple thanks to the temperature monitor app
Just do ./runTapp.sh &
in the terminal, and you are good to go!
#!/bin/sh
cd /Applications/TemperatureMonitor.app/Contents/MacOS/
./tempmonitor -th > ~/Desktop/CPUtempData.csv
while true
do
    ./tempmonitor -tv >> ~/Desktop/CPUtempData.csv
    /bin/sleep 60
done

Reference:
http://www.bresink.com/osx/216202/Docs-en/commandline.html

Tuesday, July 19, 2011

Changing the bash prompt mac

My bash prompt looked long and clumsy. So I wanted it short.

FIrst I opened the bash profile


nano .bash_profile
Then I added:
export PS1="My-Mac2:"
Write out, and voila!