Sample output(numbers changed to protect the innocent) from who -u is:
\nsfduser1 pts/42 Jan 5 10:26 1:22 19705 (10.x.x.x)\nsfduser2 pts/43 Jan 5 10:26 0:21 19706 (10.x.x.x)\nsfduser3 pts/44 Jan 5 10:26 0:32 19707 (10.x.x.x)\nsfduser4 pts/45 Jan 5 10:26 . 19708 (10.x.x.x)\nI've come up with the following for users idle 30-59 minutes
who -u | grep :.*0:[3-5]\nsfduser3 pts/44 Jan 5 10:26 0:32 19707 (10.x.x.x)and the following for users idle 60-119 minutes
who -u | grep :.*1:\nsfduser1 pts/42 Jan 5 10:26 1:22 19705 (10.x.x.x)
I'd like to combine the two into one and think the following should work, but it doesn't
who -u | grep :.*(1:|0:[3-5])Any suggestions, or should I be satisfied I remembered what I did? :-)