3 ms·
#!/bin/sh x=0;while true;do read a; test ${#a} -gt 0||exec echo $x a=${a#*:\*:};n=${a%%:*}; test $n -le 240||x=$((x+n)); done < /etc/passwd
by feelin_googley 9y ago
#!/bin/sh
x=0;while true;do read a;
test ${#a} -gt 0||exec echo $x
a=${a#*:\*:};n=${a%%:*};
test $n -le 240||x=$((x+n));
done < /etc/passwd
- feelin_googley 9y ago#!/bin/sh IFS=:;x=0;while true;do read a b c d; test ${#a} -gt 0||exec echo $x test $c -lt 240||x=$((x+c)); done < /etc/passwd