sh/shell/alias/lsblk.sh
2024-11-16 15:53:58 +01:00

27 lines
338 B
Bash

# list block devices
lb() {
lbo \
"SIZE" \
"TYPE" \
"FSTYPE" \
"LABEL" \
"MOUNTPOINTS"
}
# common arguments
lbc() {
lsblk \
--noempty \
"${@}"
}
# output arguments
lbo() {
local argument
local arguments="NAME"
for argument in "${@}"; do
arguments="${arguments},${argument}"
done
lbc \
--output "${arguments}"
}