blob: 4b41cce1dc3a5210f6245abe3547f41dbc9f72b9 [file] [log] [blame]
Robert R Evansa4d02422010-10-02 15:07:29 -07001#!/bin/bash
2
Robert R Evansa4d02422010-10-02 15:07:29 -07003function ips {
4 ifconfig | grep "inet " | awk '{ print $2 }'
5}
6
Robert R Evans070107a2010-10-02 15:23:57 -07007function myip {
8 res=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+')
Robert R Evansa6d20e62010-10-06 15:24:04 -07009 echo "Your public IP is: ${bold_green} $res ${normal}"
Robert R Evans070107a2010-10-02 15:23:57 -070010}
11
Robert R Evansa4d02422010-10-02 15:07:29 -070012
13# View man documentation in Preview
14pman () {
15 man -t "${1}" | open -f -a /Applications/Preview.app/
16}
17
18
19pcurl() {
20 curl "${1}" | open -f -a /Applications/Preview.app/
21}
22
23pri() {
24 ri -T "${1}" | open -f -a /Applications/Preview.app/
25}
26
27
28# disk usage per directory
29usage ()
30{
31 if [ $1 ]
32 then
33 du -hd $1
34 else
35 du -hd 1
36 fi
37}