[CentOS] Get only script name with shell script
semihgokalp at gmail.com
Fri Apr 24 19:41:55 UTC 2009
Thanks Bob very thanks.
2009/4/24 Bob Beers <bob.beers at gmail.com>:
> On Fri, Apr 24, 2009 at 2:35 PM, Semih Gokalp <semihgokalp at gmail.com> 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>
>> How can i do this ?
> man basename
> CentOS mailing list
> CentOS at centos.org
More information about the CentOS