This is pure laziness, but I'm looking to create a custom terminal command to extract tarballs - ie "targz" then a filename would extract a tar.gz tarball, and "tarbz2"... Well, guess.
I followed the instructions for creating custom commands found here, and while I'm sure that worked great for that asker (who wanted a command to start a couple of things for him, which required no additional arguments or anything), it's not working for me. The "targz" file in my ~/bin reads as follows:
tar -xzvf
What wizardry. So I type
targz putty-0.62.tar.gz
in the terminal, and it gives me:
tar: option requires an argument -- 'f'
Any way to make this work so I can just type "targz" then the target filename into the terminal and have it be extracted? Or, for extra sloth points, type something like "untar" then a target filename, then have it be extracted whether it's .gz or .bz2?