V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m32s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m32s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -359,11 +359,22 @@ partitioning() {
|
||||
|
||||
#IFS=$'\n' read -r -d '' -a ARY_PATHS_SORTED < <(printf "%s\n" "${ary_paths_unsorted[@]}" | sort -u | awk 'BEGIN{FS="/"}{print NF, $0}' | sort -n | cut -d' ' -f2- && printf '\0')
|
||||
|
||||
#mapfile -d '' -t ARY_PATHS_SORTED < <(
|
||||
# printf '%s\0' "${ary_paths_unsorted[@]}" |
|
||||
# awk -v RS='\0' -v ORS='\0' 'BEGIN{FS="/"} {printf "%d\t%s\0", NF, $0}' |
|
||||
# sort -z -n -t $'\t' -k1,1 -k2,2 |
|
||||
# cut -z -f2-
|
||||
#)
|
||||
|
||||
mapfile -d '' -t ARY_PATHS_SORTED < <(
|
||||
printf '%s\0' "${ary_paths_unsorted[@]}" |
|
||||
awk -v RS='\0' -v ORS='\0' 'BEGIN{FS="/"} {printf "%d\t%s\0", NF, $0}' |
|
||||
sort -z -n -t $'\t' -k1,1 -k2,2 |
|
||||
cut -z -f2-
|
||||
awk -v RS='\0' -v ORS='\0' '
|
||||
!seen[$0]++ {
|
||||
grp = ($0=="SWAP") ? 0 : 1;
|
||||
# Use TAB as field separator for the sort key
|
||||
printf "%d\t%s\0", grp, $0
|
||||
}
|
||||
' | sort -z -t $'\t' -k1,1 -k2,2 | cut -z -f2-
|
||||
)
|
||||
|
||||
printf "%s\n" "${ary_paths_unsorted[@]}" >| "${DIR_LOG}/mount_paths_unsorted.log"
|
||||
|
||||
Reference in New Issue
Block a user