From e95b5fa006837df1566d3267cc6f16624d7bf8fd Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Tue, 7 Oct 2014 08:49:35 +0300 Subject: [PATCH] bashrc & zshrc: fix top10 function it was missing escaping of \history and it was returning timestamps --- bashrc | 2 +- zshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 0e23f46f..85e6451d 100644 --- a/bashrc +++ b/bashrc @@ -618,7 +618,7 @@ JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's # Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j function top10() { # copyright 2007 - 2010 Christopher Bratusek - history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head + \history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head } # ex command. Copied from bashrc of bioterror ( http://ricecows.org/configs/bash/.bashrc ). Original comment below: diff --git a/zshrc b/zshrc index b9c2fd59..fa1005f8 100644 --- a/zshrc +++ b/zshrc @@ -591,7 +591,7 @@ JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's # Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j function top10() { # copyright 2007 - 2010 Christopher Bratusek - history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head + \history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head } # ex command. Copied from zshrc of bioterror ( http://ricecows.org/configs/zsh/.zshrc ). Original comment below: