I have a script (let’s call it script) with a file parameter. I want the script user to be able to use wildcards in this parameter.
What do I have to use to cause the parameter variable revert to the full path?
eg script ~/*gz
So inside bash
do x to turn variable $1 (~/*gz) into /home/name/file.tar.gz
Try
readlink -f. But the shell should expand the parameter, unless the wildcards are escaped. Also, does it have to be bash? why not use some scripting language like perl for that purpose?