unbox/utils.sh

16 lines
238 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
}
2020-01-31 10:16:17 +00:00
function mem_size(){
echo $(($(cat /proc/meminfo | grep MemTotal | awk '{print $2}')*1024))
}
function dev_size(){
blockdev --getsize64 $1
}