4 ms·
You might enjoy replacing your extract function with atool (https://www.nongnu.org/atool/ https://www.nongnu.org/atool/) which provides aunpack. It works simila
by callahad 8y ago
You might enjoy replacing your extract function with atool (https://www.nongnu.org/atool/ https://www.nongnu.org/atool/) which provides aunpack. It works similarly, but has niceties like creating and unpacking into a subdirectory to avoid accidentally spraying files all over the current working directory if the archive has multiple files at its root.
- sjf 8y agoSimilarly, the unp script automatically detects and unpacks most archives https://manpages.debian.org/jessie/unp/unp.1.en.html https://manpages.debian.org/jessie/unp/unp.1.en.html