unbox/utils.sh

29 lines
355 B
Bash
Raw Normal View History

2020-01-29 13:51:37 +00:00
#!/bin/bash
function prefix_time(){
while read LINE; do
echo "["$(date)"] "$LINE
done
}
function one_token_per_line(){
for L in $1; do
echo $L
done
}
function block_devices(){
#lsblk -fPpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
lsblk -frpno NAME
}
function foo(){
while read LINE; do
(
export $LINE
echo "> "$NAME
)
done
}