#TIL #bash cut과 dirname으로 path 조작
$ echo a/b/c/d | cut -d/ -f 2 b $ echo a/b/c/d | cut -d/ -f -2 a/b $ echo a/b/c/d | cut -d/ -f 2- b/c/d
$ echo a/b/c/d | cut -d/ -f 2 b $ echo a/b/c/d | cut -d/ -f -2 a/b $ echo a/b/c/d | cut -d/ -f 2- b/c/d
$ du -h ~/.emacs.d/init.el 8.0K /Users/ohyecloudy/.emacs.d/init.el $ du -h ~/.emacs.d/init.el | cut -f1 8.0K
$ curl -s http://support-sp.apple.com/sp/product?cc=`system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' | cut -c 9-` | sed 's|.*<configCode>...