Hacker News new | past | comments | ask | show | jobs | submit login

You might enjoy replacing your extract function with 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.



Similarly, the unp script automatically detects and unpacks most archives https://manpages.debian.org/jessie/unp/unp.1.en.html




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: