Your top ten bash commands, visually:
#bash line:
$ awk '{print $1}' ~/.bash_history | sort | uniq -c | sort -nr | head -10 > freq.txt && commands &
----
(Calls the following executable Python script named "commands"):
#! /usr/bin/python3
import matplotlib.pyplot as plt
commands = []
counts = []
with open('freq.txt', 'r') as f:
for line in f:
count, command = line.strip().split(maxsplit=1)
commands.append(command)
counts.append(int(count))
plt.figure(figsize=(10, 6))
plt.barh(commands[::-1], counts[::-1], color='skyblue')
plt.xlabel("Usage Count")
plt.title("Top 10 Bash Commands by Frequency")
plt.tight_layout()
plt.show()
----