1
0
Fork 0

m: don't increment variables inside subshell

Dieser Commit ist enthalten in:
Lucas 2020-04-26 17:47:18 +00:00
Ursprung 54f5477b0f
Commit aa86bb5c6e
1 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -38,14 +38,14 @@ _mlist_i_rec()
tmc=0
entries=0
while IFS= read -r dir; do
mdirs "$dir" | mlist -i | tail -n 1 | {
IFS=" " read -r uc ut fc ft mc mt dummy
_mlist_i_rec_ln "$uc" "$fc" "$mc" "$dir"
tuc=$((tuc + uc))
tfc=$((tfc + fc))
tmc=$((tmc + mc))
entries=$((entries + 1))
}
IFS=" " read -r uc ut fc ft mc mt dummy <<EOF
$(mdirs "$dir" | mlist -i | tail -n 1)
EOF
_mlist_i_rec_ln "$uc" "$fc" "$mc" "$dir"
tuc=$((tuc + uc))
tfc=$((tfc + fc))
tmc=$((tmc + mc))
entries=$((entries + 1))
done
if [ $entries -gt 1 ]; then
_mlist_i_rec_ln "$tuc" "$tfc" "$tmc"