How to untar in a version agnostic way?
I want to repetitively untar a file which I often download in new versions; for example:
cd download_directory
myFile-1.99.tar.gz # Version 2.x might be released next day or next week or next month;
I have tried a similar command with shellglob/wildcard which failed:
cd download_directory
tar -xzv myFile-*.tar.gz
I also tried the following command after reading the manual about `--wildcards` but it also failed:
cd download_directory
tar -xzv myFile-*.tar.gz --wildcards
How to untar in a version agnostic way?
cd download_directory tar -xzf "$(find . -name 'myFile-*.tar.gz' | tail -n 1)"