32 lines
542 B
Bash
32 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}"
|
||
|
}
|