Apr 28, 2009 #1 cryptoadm MIS Nov 6, 2008 71 US In Perl what is the equivalent of basename $0 For example: # cat test.sh Code: #!/bin/ksh prog=`basename $0` echo $prog returns: test.sh
In Perl what is the equivalent of basename $0 For example: # cat test.sh Code: #!/bin/ksh prog=`basename $0` echo $prog returns: test.sh
Apr 28, 2009 1 #2 prex1 Programmer May 10, 2007 482 IT perlvar said: $0 Contains the name of the program being executed. Click to expand... Franco http://www.xcalcs.com : Online engineering calculations http://www.megamag.it : Magnetic brakes for fun rides http://www.levitans.com : Air bearing pads Upvote 0 Downvote
perlvar said: $0 Contains the name of the program being executed. Click to expand... Franco http://www.xcalcs.com : Online engineering calculations http://www.megamag.it : Magnetic brakes for fun rides http://www.levitans.com : Air bearing pads
Apr 29, 2009 1 #3 rharsh Technical User Apr 2, 2004 960 US Code: #!perl use File::Basename; my $prog = basename($0); print "$prog\n"; Upvote 0 Downvote