style: use -n flag in head and tail commands (#10391)

Co-authored-by: Marc Cornellà <hello@mcornella.com>
This commit is contained in:
Kevin Burke
2021-11-09 00:04:10 -08:00
committed by GitHub
parent 55682e3692
commit e86c6f5e7f
8 changed files with 15 additions and 15 deletions

View File

@ -1,7 +1,7 @@
function zsh_stats() {
fc -l 1 \
| awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \
| grep -v "./" | sort -nr | head -20 | column -c3 -s " " -t | nl
| grep -v "./" | sort -nr | head -n 20 | column -c3 -s " " -t | nl
}
function uninstall_oh_my_zsh() {
@ -45,7 +45,7 @@ function takeurl() {
data="$(mktemp)"
curl -L "$1" > "$data"
tar xf "$data"
thedir="$(tar tf "$data" | head -1)"
thedir="$(tar tf "$data" | head -n 1)"
rm "$data"
cd "$thedir"
}