For June’s challenge, write a program to read the history of shell commands and determine which ones you use the most.
In bash, you can set the
HISTFILESIZE to control
history‘s behavior. To get the commands to count, you can read the right file or shell out to the
history command. From there, you have to decide how to split up each line to figure out what the command is. Can you handle commands with relative paths and absolute paths so you don’t count them separately?
This was an meme for a little while, and I wish I could find my answer to it. If you find my answer, please let me know.