[CentOS] Get only script name with shell script
Steve Thompson
smt at vgersoft.comFri Apr 24 18:40:38 UTC 2009
- Previous message: [CentOS] Get only script name with shell script
- Next message: [CentOS] Get only script name with shell script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 24 Apr 2009, Semih Gokalp wrote: > 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 ? Instead of: echo $0 use: echo `basename $0` -Steve
- Previous message: [CentOS] Get only script name with shell script
- Next message: [CentOS] Get only script name with shell script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list