"${0##*/}" is the equivalent of "basename $0".
I.e. From /usr/bin/sh we get just sh.
Also try this to execute commands $(shell command)
Search This Blog
Showing posts with label basename. Show all posts
Showing posts with label basename. Show all posts
Tuesday, June 28, 2011
Thursday, April 08, 2010
Using awk to remove path and print file date
$ls -lat /current/*xml | \
nawk '{printf "%s ", $8; system("basename " $9)}'
20:24 file1.xml
21:44 file2.xml
22:34 file3.xml$
Subscribe to:
Posts (Atom)