I have a script that is using a switch case to check for file extensions and do something on that.
# Gets the extension of the file
Extension=${file##*.}
case ${Extension} in
abc)
#Do something
pqr)
#Do something
*)
#Print the usage
The script is called as "script.sh -G filename.abc".
My requirement is to call this script with a file name having no extension. For ex: script.sh -G FileName.
How do i implement this in my current script?