new_suffix='suffix'

$(var%suffix)"$new_suffix"
bash -e script

Or add the following line in the shell script :

set -e

count++

(( count + 1 ))
(( count++ ))
FILE="/home/vivek/lighttpd.tar.gz"
basename "$FILE"
f="$(basename -- $FILE)"
echo "$f"

Index