Bash: script with getopts and file globbing?
by narcissus256 from LinuxQuestions.org on (#5AZE7)
Hi,
I am trying to write a script where I need to get an input from a user from getopts.
That wouldn't be a problem, but I also need the user to select any number of files which the script should process.
Let's say that a command should look like this:
Code:mp3tag -a "Artist name" -t "Song title" -n "Track number" *.mp3How can I ensure that my mp3tag script understands file globbing? I have been scripting for a while, but can't get over this obstacle. Thank you!


I am trying to write a script where I need to get an input from a user from getopts.
That wouldn't be a problem, but I also need the user to select any number of files which the script should process.
Let's say that a command should look like this:
Code:mp3tag -a "Artist name" -t "Song title" -n "Track number" *.mp3How can I ensure that my mp3tag script understands file globbing? I have been scripting for a while, but can't get over this obstacle. Thank you!