33 lines
475 B
Bash
33 lines
475 B
Bash
# handle block devices
|
|
|
|
# list block devices
|
|
#= lb
|
|
a__list_block() {
|
|
a__list_block_output \
|
|
"SIZE" \
|
|
"TYPE" \
|
|
"FSTYPE" \
|
|
"LABEL" \
|
|
"MOUNTPOINTS" \
|
|
"${@}"
|
|
}
|
|
|
|
# base arguments
|
|
#= lbne
|
|
a__list_block_no_empty() {
|
|
lsblk \
|
|
--noempty \
|
|
"${@}"
|
|
}
|
|
|
|
# output arguments
|
|
#= 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}"
|
|
}
|