Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
-
The problem statement, all variables and given/known data:
I want to create a file called Allusers that contains the list of
currently logged on users and the total number of them.
(note: it should print, The Total is: , at the end of the Allusers file)
I have made the command, and when i perform it , it show me all the users and it print the total of them. But my problem that the command doesn't save the result in the Allusers file. -
Relevant commands, code, scripts, algorithms:
who
sort
tee
cat
echo
cat
wc
- The attempts at a solution (include all code and scripts):
who | sort -t: -k1 | tee All |cat; echo Total; cat All |wc -l; rm All > Allusers
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of Newengland, Armidale, NSW, Australia
Dr.Paul Kwan, COMP170.