blob: d1f467d1cbbd35fc1d0c099c7ef9b4edaa93e9bb [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 Evansc9da0862010-10-06 17:27:55 -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 () {
Robert R Evansc9da0862010-10-06 17:27:55 -070015 man -t "${1}" | open -f -a $PREVIEW
Robert R Evansa4d02422010-10-02 15:07:29 -070016}
17
18
19pcurl() {
Robert R Evansc9da0862010-10-06 17:27:55 -070020 curl "${1}" | open -f -a $PREVIEW
Robert R Evansa4d02422010-10-02 15:07:29 -070021}
22
23pri() {
Robert R Evansc9da0862010-10-06 17:27:55 -070024 ri -T "${1}" | open -f -a $PREVIEW
Robert R Evansa4d02422010-10-02 15:07:29 -070025}
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}