#!/bin/bashecho "<txt>"$(VAR="$(cat /proc/loadavg)"OAL=${VAR%%.*}FIL=$(cat /proc/loadavg | cut -d '.' -f 2)PRC=$(cat /proc/loadavg | cut -d ' ' -f 4)echo "$OAL$FIL $PRC")"</txt>"echo "<tool>"$(uptime -p)"</tool>"
$ uptime 09:06:47 up 85 days, 18:11, 3 users, load average: 1.20, 1.07, 1.11
Anyway, that's how I like it.Condensed!
#!/bin/bashIFS=" " read a b c d e </proc/loadavgecho "<txt>${a%.*}${a#*.} ${b%.*} ${d}</txt>"echo "<tool>"$(uptime -p)"</tool>"
This will do: