Shell scripting

[COLOR=black]Was wondering if someone could help me out. I get this error message each time I try to execute the code underneath.

/home/demon/ line 8: [: too many arguments

Script contents:


echo $SOME

USER=w -h |awk '{ print $1 }' |sort |wc

if [ $USER = 5 ]; then
grep $SOME

What I want to do is:
That the script stores the output of the whoami command in a
variable. Then, if the number of users logged into the system (not
unique) is equal to 5, it should grep /etc/passwd for
the contents of the variable I created above.

Any help thxz. Yeah you can post a complete new code don’t mind.