On Fri, Apr 24, 2009 at 09:35:00PM +0300, Semih Gokalp wrote:
Hi all,
I wrote shell script and put it under the /usr/local/bin/ directory.
I use echo $0 for get script name but it has printed "/usr/local/bin/<scriptname>" but i want to only print <scriptname>
I use:
PROGRAM=$(basename $0)
in all my scripts to tag the name of the currently executing script.
John