is actually equivalent to the UNIX utility basename(1). basename takes a pathname as argument and returns the filename only; it is meant to be used with the shell's com... unctions: tr, cut, paste, and join. Given a filename like /home/myplace/a.data.directory/a.filename.txt which we'll call $f you could use commands li... as previously unset or null.
Example:
echo ${HOME:="/home/.nohome"}
${parameter:?word}
Generate an error if para... ull by printing word to stdout.
Example:
: ${HOME:="/home/.nohome"}
${TMP:?"Error: Must have a valid Temp Variab
y: zmore "" arg2 arg3
then
echo "Usage: `basename $0` filename" >&2
# Error message to stderr.
exit $E_NOARG... error code).
fi
filename=$1
if [ ! -f "$filename" ] # Quoting $filename allows for possible spaces.
then
echo "File $filename not found!" >&2 # Error message to stderr.
exit $E_NOTFOUND
fi
if [ ${filename##*.} != "gz" ]
# Using bracket in variable substi