N
N
neykold2022-01-25 13:42:52
linux
neykold, 2022-01-25 13:42:52

How to count the number of active sessions?

It is necessary to count the number of active user sessions whose names end with the letters "r,x,z". Tell me please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hint000, 2022-01-25
@hint000

w |tail -n +3|awk '{print $1}'|grep 'r$\|x$\|z$'|wc -l

(that's just what you will learn by copy-pasting the teacher's ready-made answers?)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question