MacTerminalCommand

Mac Terminal Command#

mkdir + cd#

  1. mkdir [dir] && cd '$_'
    ```
  2. shell function

    • ~/.bashrc
    function mkcd {
    if [ ! -n "$1" ]; then
    echo "Enter a directory name"
    elif [ -d $1 ]; then
    echo "\`$1' already exists"
    else
    mkdir $1 && cd $1
    fi
    }

내 아이피 주소 깔끔하게 확인#

ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'

Reference#

Last updated on