rwx/sh/alias/lsblk.sh
Marc Beninca 020aaa0b9a
All checks were successful
/ job (push) Successful in 1m12s
refactor(history): commit development branch
new development branch from root commit
2025-02-10 21:54:51 +01:00

31 lines
542 B
Bash

# list block devices
lb() { a__list_block "${@}"; }
a__list_block() {
a__list_block_output \
"SIZE" \
"TYPE" \
"FSTYPE" \
"LABEL" \
"MOUNTPOINTS" \
"${@}"
}
# base arguments
lbne() { a__list_block_no_empty "${@}"; }
a__list_block_no_empty() {
lsblk \
--noempty \
"${@}"
}
# output arguments
lbo() { a__list_block_output "${@}"; }
a__list_block_output() {
local argument
local arguments="NAME"
for argument in "${@}"; do
arguments="${arguments},${argument}"
done
a__list_block_no_empty \
--output "${arguments}"
}