From: Siraaj Khandkar Date: Tue, 17 Dec 2019 03:08:11 +0000 (-0500) Subject: Remove redundant step X-Git-Url: https://git.xandkar.net/?p=snip.git;a=commitdiff_plain;h=d9de1240e3d2057ff87fe2f99c29bf80f18036bd;hp=5f07c75c2a62c9efac34fcfeb2083c301a6150e6 Remove redundant step --- diff --git a/viz_cmd_usage_zsh_history.sh b/viz_cmd_usage_zsh_history.sh index 8fc58db..7fd34f1 100755 --- a/viz_cmd_usage_zsh_history.sh +++ b/viz_cmd_usage_zsh_history.sh @@ -2,4 +2,4 @@ # First pipe member may need to be modified for a desired history file (path and splitting). -awk -F';' '{sub("^" $1 ";", ""); print}' ~/.zsh_history | awk '{print $1}' | awk '{curr = $1; links[NR, prev] = curr; prev = curr} END {printf "digraph G {"; for (node in links) {split(node, n, SUBSEP); printf "\"%s\" -> \"%s\"\n", n[2], links[node]}; printf "}\n"}' | neato -T png | feh - +awk -F';' '{sub("^" $1 ";", ""); print}' ~/.zsh_history | awk '{curr = $1; links[NR, prev] = curr; prev = curr} END {printf "digraph G {"; for (node in links) {split(node, n, SUBSEP); printf "\"%s\" -> \"%s\"\n", n[2], links[node]}; printf "}\n"}' | neato -T png | feh -