4 declare columns
=,NAME
,LABEL
,MOUNTPOINT
,RM
,SIZE
,TYPE
,FSTYPE
,UUID
,
10 if [[ $arg =~ ^
(-o|
--output)$
]]
16 if [[ $arg =~ ^
(-o|
--output=?
)([-+])(.
+)$
]]
18 addremove
=${BASH_REMATCH[2]}
19 cols
=${BASH_REMATCH[3]}
20 for col in ${cols//,/ }
24 columns
="$columns,$col,"
26 columns
=${columns/,$col,/,}
29 elif [[ $arg =~ ^
(-o|
--output)=(.
*)$
]]
31 columns
=${BASH_REMATCH[2]}
40 for col in ${columns//,/ }
42 if ! grep -q ",$col," <<< "$arg_o"
52 exec /bin
/lsblk
-o "$arg_o" "${args[@]}"