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

Per a subsequent comment in the github thread:

"the ${0%/*} pulls the path out of $0, cd's into the specified directory, then uses $PWD to figure out where that directory lives - and all this in a subshell, so we don't affect $PWD"

So for example, that would take /user/amputect/seam_setup.sh and change directories into into /user/amputect.



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

Search: