blob: bbb6f2f60eee06f7e2caac57c278a35baf70e36c [file] [log] [blame]
Robert R Evansa4d02422010-10-02 15:07:29 -07001#!/bin/bash
2
3function rh {
4 history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
5}
6
7function ips {
8 ifconfig | grep "inet " | awk '{ print $2 }'
9}
10
11
12# View man documentation in Preview
13pman () {
14 man -t "${1}" | open -f -a /Applications/Preview.app/
15}
16
17
18pcurl() {
19 curl "${1}" | open -f -a /Applications/Preview.app/
20}
21
22pri() {
23 ri -T "${1}" | open -f -a /Applications/Preview.app/
24}
25
26
27# disk usage per directory
28usage ()
29{
30 if [ $1 ]
31 then
32 du -hd $1
33 else
34 du -hd 1
35 fi
36}