Could anyone eloborate how ##*/ works in UNIX Shell scripting. I have seen it's use in Korn Shell. It is specifically used for removing extension of file.
e.g. func_write_app_log "o Deleting status file ${CIE_STATUS_FILE##*/}"
Here suppose the file is CIE_STATUS_FILE.DAT, then ##*/ will display CIE_STATUS_FILE
This also works in Bash and is described here:
The
*
is a wildcard which means match anything. Your example removes the path from the file, not the extension.To remove the extension you want to use
%
: