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:
The uniq command excludes consecutive duplicate lines. It has a -c option to display a count of the number of occurances of each line.
-using the man pages as necessary, analyze the following command:
history | cut -c 8-100 | cut -d " " -f 1 | sort | uniq -c
-
Relevant commands, code, scripts, algorithms:
-
The attempts at a solution (include all code and scripts):
This was the results from running the command. I have no clue what the command is doing and how the it got the results. Could someone please explain what this command is doing?
william.makarevich@socrates:/home/801NANBEA$ history | cut -c 8-100 | cut -d " " -f 1 | sort | uniq -c
2 ~
2 Andy
2 Anne
6 awk
5 cal
25 cat
11 cd
1 chgrp
2 Claudia
27 clear
1 ~clear
1 cls
7 cp
1 cut
2 %D
2 Danny
85 date
1 ~date
1 del
2 Dennis
3 diff
6 echo
1 env
8 exit
2 grep
1 groups
4 head
1 hist
16 history
2 hostname
1 id
2 Jeff
2 Lewis
2 Lisa
1 list
25 ls
51 man
1 ~man
2 Mickey
2 Mini
3 mkdir
1 more
1 msn
2 mv
1 ps
14 pwd
3 q
1 :q
1 Q
1 QQ
4 quit
1 :quit
2 Rex
4 rm
1 rmdir
2 Robert
2 Ruby
1 Sat,
2 Sherelene
4 sort
2 spell
4 tail
2 Tony
1 touch
2 Vermont
14 vi
5 wc
2 which
2 Wilbert
2 william.makarevich@socrates:~$
2 Williams
2 Yoga
2 ZZ
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Colorado Tech University
Colorado Springs, CO, USA
Professor: Matt Hodges
Course # CS146
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).