AK
Size: a a a
AK
AK
AK
AK
#!/bin/bash
arc_name=$1
dir_name=${arc_name%.*}
ncores=$(nproc)
declare -A hsh_cmd_t=(
['7-zip']='7za x -bd -mmt%d %s >/dev/null 2>&1'
['cr-unzip']='CRYSTAL_WORKERS=%d cr-unzip %s'
)
for method in "${!hsh_cmd_t[@]}"; do
echo ">>>>>> Using method: $method <<<<<<"
cmd_t=${hsh_cmd_t[$method]}
for ((nw=2; nw<=ncores; nw+=2)); do
echo "=== $nw workers: ==="
rm -rf "$dir_name"
[[ -d $dir_name ]] && {
echo "failed to remove $dir_name directory" >&2
exit 1
}
eval 'time '$(printf "$cmd_t" $nw $arc_name)
done
done
AK
f

V
DB
f
HH
DS
В
AK
N
N
N
N
В