Archive for October 2008

Can a bash script figure out the full pathname to itself?

Yeah, but it needs help. Here’s a script demonstrating a technique I just developed. #!/bin/bash##————————————————————————–## Written 2008-10-01 by mike@diehn.net.## Demonstrates a technique for acquiring the full pathname of a# script from within the script itself, using only shell# features. I also show how to get just the parent directory# name from that result, again using […]