Use basename(1) against $0 when printing usage information - statusbar - Shell script to set/print a status bar
 (HTM) hg clone https://bitbucket.org/iamleot/statusbar
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) changeset edd16c1b8fc9c2fa6a023511574bcad4dfaf2585
 (DIR) parent 819ce865f6f308e0bcd07633e25d4773dcb4a4ad
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Tue, 27 Feb 2018 20:07:29 
       
       Use basename(1) against $0 when printing usage information
       
       Diffstat:
        statusbar.sh |  3 ++-
        1 files changed, 2 insertions(+), 1 deletions(-)
       ---
       diff -r 819ce865f6f3 -r edd16c1b8fc9 statusbar.sh
       --- a/statusbar.sh      Tue Feb 27 19:46:40 2018 +0100
       +++ b/statusbar.sh      Tue Feb 27 20:07:29 2018 +0100
       @@ -189,7 +189,8 @@
        
        args=`getopt 1os: $*`
        if [ $? -ne 0 ]; then
       -       echo "usage: $0 [-1o] [-s seconds]"
       +       progname=`basename "$0"`
       +       echo "usage: $progname [-1o] [-s seconds]"
               exit 2
        fi
        set -- $args