I need to extract the last field of the uptime command, but I also need to remove the . that is present. For example, if the output of uptime is
19:54:09 up 1:41, 1 user, load average: 0.32, 0.37, 0.31
I need 031.
I know how to do it using pipe of awk and sed like this:
uptime | awk '{ print $NF }' | sed 's/\.//'
Is there any way to do it using only one of those two? Can they both do it without the other?