Skip to content

Instantly share code, notes, and snippets.

@ybur-yug
Last active September 9, 2017 21:18
Show Gist options
  • Save ybur-yug/f18293d6e3a1703403563b1d3df77742 to your computer and use it in GitHub Desktop.
Save ybur-yug/f18293d6e3a1703403563b1d3df77742 to your computer and use it in GitHub Desktop.
TOP_5=`(history | awk '{print $2}' | sort | uniq -c | sort -rn | head -n 5)`
for score in `echo $TOP_5 | xargs`; do
# command="$(echo $score | awk '{print $2}' | tr -d '\n')"
score="$(echo $score | awk '{print $1}' | tr -d '\n')"
num_hashes="$(echo $score | awk '{print $1 / 25}' | awk -F. '{print $1}')"
hashes="$(jot -b '#' - 1 $num_hashes | xargs | tr -d ' ')"
echo "$hashes"
done
######################################################################################################################
##
#######################################
##
########################
##
######################
##
####################
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment