DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

My Own Bashrc Quickhelp

12.18.2008
| 1662 views |
  • submit to reddit
        // description at http://awasihba.wordpress.com/2008/12/18/my-own-bashrc-help/


function myhelp {
#This prints help over here
FILE="$HOME/myfunctions"
grep -A 1 ^function $FILE | sed -e '  /^--/d ; /^function/ { s/^function//g; s/{//g;   N;   s/n#(.*)/ - 1/; } '
}

function py {
#Ping yahoo.com
  ping www.yahoo.com
}

function debugAE {
#Start debugging apple events on console
        if [ "$1" == "on" ]
        then
                export AEDebugSends=1
                export AEDebugReceives=1
        else
                export AEDebugSends=0
                export AEDebugReceives=0
        fi
}