Hacker News new | ask | show | jobs
by dastx 2015 days ago
Running a script as sh script.sh returns only script.sh, thus, you've already got SELF, but you wouldn't get DIR.
1 comments

but, you don't need it since you are already there, and can just use $PWD (no need for `pwd`) from that point onward.