Is there a way to suppress globbing in parameter expansion? Consider the case of a file named literally *.xml
in a directory among other xml files. Is there a way to do a parameter expansion ${param##*/}
affecting only the file *.xml
and not all the xml files?
param=./*.xml
echo "$param" # Displays only ./*.xml
echo $param # Displays ./*.xml ./invoice.xml ./bla.xml ...
echo ${param##*/} # Displays *.xml invoice.xml bla.xml ...
# what I want:
echo ${param##*/} # Displays only *.xml