Yes, I know how to get it. But I'm curious and would like your feedback.
Assuming that my script is BASH specific, is there any reason why I should
not use the command:
SCRIPT_NAME=${0##*/}
instead of
SCRIPT_NAME=$(basename "$0")
?
I ask because I feel that the first example, though not universal to all
shells, is worth it due to being more efficient. I don't fork() a new
process or need to run an external program.
I also know this might not matter much to Linux, even on a z. But the
first also works in z/OS with its default shell, and that saves me CPU
which saves me money. Well, saves the company money, actually.
--
Trying to write with a pencil that is dull is pointless.
Maranatha!
John McKown
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390