2023-05-14 11:45:02 +00:00
|
|
|
# list block devices
|
2024-11-19 13:42:11 +00:00
|
|
|
lb() { a__list_block "${@}"; }
|
|
|
|
a__list_block() {
|
|
|
|
a__list_block_output \
|
2024-11-16 14:53:58 +00:00
|
|
|
"SIZE" \
|
|
|
|
"TYPE" \
|
|
|
|
"FSTYPE" \
|
|
|
|
"LABEL" \
|
2024-11-18 17:50:54 +00:00
|
|
|
"MOUNTPOINTS" \
|
|
|
|
"${@}"
|
2024-11-16 14:53:58 +00:00
|
|
|
}
|
2023-05-12 23:59:08 +00:00
|
|
|
|
2024-11-16 15:07:47 +00:00
|
|
|
# base arguments
|
2024-11-19 13:42:11 +00:00
|
|
|
lbne() { a__list_block_no_empty "${@}"; }
|
|
|
|
a__list_block_no_empty() {
|
2024-11-16 14:53:58 +00:00
|
|
|
lsblk \
|
|
|
|
--noempty \
|
|
|
|
"${@}"
|
|
|
|
}
|
|
|
|
|
|
|
|
# output arguments
|
2024-11-19 13:42:11 +00:00
|
|
|
lbo() { a__list_block_output "${@}"; }
|
|
|
|
a__list_block_output() {
|
2024-11-16 14:53:58 +00:00
|
|
|
local argument
|
|
|
|
local arguments="NAME"
|
|
|
|
for argument in "${@}"; do
|
|
|
|
arguments="${arguments},${argument}"
|
|
|
|
done
|
2024-11-19 13:42:11 +00:00
|
|
|
a__list_block_no_empty \
|
2024-11-16 14:53:58 +00:00
|
|
|
--output "${arguments}"
|
|
|
|
}
|