27 lines
336 B
Bash
27 lines
336 B
Bash
# list block devices
|
|
lb() {
|
|
lbo \
|
|
"SIZE" \
|
|
"TYPE" \
|
|
"FSTYPE" \
|
|
"LABEL" \
|
|
"MOUNTPOINTS"
|
|
}
|
|
|
|
# base arguments
|
|
lbb() {
|
|
lsblk \
|
|
--noempty \
|
|
"${@}"
|
|
}
|
|
|
|
# output arguments
|
|
lbo() {
|
|
local argument
|
|
local arguments="NAME"
|
|
for argument in "${@}"; do
|
|
arguments="${arguments},${argument}"
|
|
done
|
|
lbb \
|
|
--output "${arguments}"
|
|
}
|