Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here are a few bash_profile functions I use often:

    #prints IPs from terminal on OS X
    function ip() {
        IP=`ifconfig -a | grep inet | grep -v inet6 | grep -v 127.0.0.1 | awk '{print $2}'`
        echo $IP
    }

    #instantly quits lotus notes
    function kill_lotus() {
        ps auxww | grep -i notes | grep -v grep | awk '{print $2}' | xargs kill -9
    }


FWIW, your kill_lotus function is equivalent to:

    pgrep notes | xargs kill -9




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: