rwx/sh/alias/lsblk.sh

34 lines
475 B
Bash
Raw Normal View History

2025-07-06 07:17:11 +02:00
# handle block devices
# list block devices
2025-07-06 07:17:11 +02:00
#= lb
a__list_block() {
a__list_block_output \
"SIZE" \
"TYPE" \
"FSTYPE" \
"LABEL" \
"MOUNTPOINTS" \
"${@}"
}
# base arguments
2025-07-06 07:17:11 +02:00
#= lbne
a__list_block_no_empty() {
lsblk \
--noempty \
"${@}"
}
# output arguments
2025-07-06 07:17:11 +02:00
#= lbo
a__list_block_output() {
local argument
local arguments="NAME"
for argument in "${@}"; do
arguments="${arguments},${argument}"
done
a__list_block_no_empty \
--output "${arguments}"
}