From 0a57255043d84bcc58fd6df966b1ba5813e8fee1 Mon Sep 17 00:00:00 2001 From: pants Date: Tue, 6 Jan 2026 20:01:57 -0800 Subject: [PATCH] document --- bin/multi_unzip | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/multi_unzip b/bin/multi_unzip index f762ac9..94ecd3f 100755 --- a/bin/multi_unzip +++ b/bin/multi_unzip @@ -1,3 +1,11 @@ +#!/bin/sh + +# unzips the contents of every present zip archive into directories of the same name +# the % is used to remove the file extension (.zip). +# % matches the shortest occurence from the end. +# %% would remove all extensions (.tar.gz would be matched by %%) +# # and ## are the corresponding operators for matching at the beginning + for file in ./*.zip; do dir_name=${file%.*} mkdir -p "$dir_name"