$ path_stripped_programname="${0##*/}"
Useful in shell scripts when you're trying to get the shell script name without the full path - and easier than awking or cutting. Bash pattern matching and variable manip is fun.
by David Winterbottom (codeinthehole.com)
0sem comentários ainda