So, lets say I have 6 files that are all the same type. In my specific case all of them are zip files and I want to select all of them and "pass them through" a shell script that "unzips" all of them.
I can already do it selecting one by one as the script simply does:
#!/bin/bash
DIR=$(dirname "$@")
exec unzip "$@" -d "${DIR}"
So it unzips the "zip file" exactly where I have it.
Now, when I select multiple files (aka more than one file). I don't know what happens as I don't fully understand what is "parsed" into the script.
I found this What does $@ mean in a shell script?
So I would like to know how to do it right. Thanks a lot.