rwx/sh/fs/lsblk.sh
2025-07-27 16:51:38 +02:00

34 lines
489 B
Bash

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