From 326456846c589bbe51438b735d411914dc9fd923 Mon Sep 17 00:00:00 2001 From: Chris Coley <chris@codingallnight.com> Date: Sun, 13 Dec 2015 00:57:49 -0800 Subject: [PATCH] Small tweaks --- bash_aliases | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/bash_aliases b/bash_aliases index 6576f9c..8bceb97 100644 --- a/bash_aliases +++ b/bash_aliases @@ -1,4 +1,3 @@ - ################# # Aliases # ################# @@ -25,7 +24,7 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date # Date/Time aliases alias now='date +%T' -alias nowtime=now +alias nowtime='now' alias nowdate='date +%m-%d-%Y' alias timezone='date +"%Z (GMT %:z)"' @@ -62,33 +61,33 @@ alias free='free -ht' # Count the number of files in a directory and its sub-directories alias _count='echo "count(): Count the number of files in a directory and its sub-directories"' function count { - find $1 -type f | wc -l + find $1 -type f | wc -l } # Show a histogram output of commands in history alias _hist='echo "hist(): Show a histogram output of commands in history"' function hist { - history | awk '{print $2}' | sort -n | uniq -c | sort -n | tail + history | awk '{print $2}' | sort -n | uniq -c | sort -n | tail } # Make a directory, then cd into it alias _mcd='echo "mcd(): Make a directory, then cd into it"' function mcd { - mkdir -pv $1 - cd $1 - pwd + mkdir -pv $1 + cd $1 + pwd } # Print a color chart alias _color='echo "color(): Print a color chart"' function color { - for x in 0 1 4 5 7 8; do + for x in 0 1 4 5 7 8; do for i in `seq 30 37`; do for a in `seq 40 47`; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; - done; + done; echo; done; - done; - echo -e "\e[0m"; + done; + echo -e "\e[0m"; } -- GitLab