Use '-b' option with file(1) instead of cut(1). - various - Various utilities developed at bitreich.
HTML git clone git://bitreich.org/various/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/various/
DIR Log
DIR Files
DIR Refs
DIR Tags
---
DIR commit 9dbe214f2615fe3bcf5159946c26aba09c5c939c
DIR parent 9a3949c788a4072b06ff297ba9d8315f4f1e5106
HTML Author: eidolon <me@svickova.ma>
Date: Tue, 10 Jan 2023 00:31:17 -0500
Use '-b' option with file(1) instead of cut(1).
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
M quinq-size | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/quinq-size b/quinq-size
@@ -8,7 +8,7 @@ fi
function toquinqsize {
filename="$1"
- mimetype="$(file --mime-type "${filename}" | cut -d':' -f 2 | cut -d' ' -f 2-)"
+ mimetype="$(file --mime-type -b "${filename}")"
output="${filename%.*}_quinqsize.${filename##*.}"
case "${mimetype}" in
image/*)