Improved awkuniq alias and fixed some other bugs
This commit is contained in:
parent
c059e55a57
commit
12f2d9e986
@ -2,6 +2,7 @@
|
||||
home.packages = with pkgs; [
|
||||
feh
|
||||
vlc
|
||||
dconf
|
||||
firefox
|
||||
zoom-us
|
||||
discord
|
||||
@ -40,4 +41,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,6 @@
|
||||
openldap
|
||||
rustscan
|
||||
inetutils
|
||||
wireshark
|
||||
thc-hydra
|
||||
exploitdb
|
||||
responder
|
||||
|
@ -5,9 +5,9 @@
|
||||
dig
|
||||
iftop
|
||||
iperf
|
||||
tshark
|
||||
tcpdump
|
||||
ethtool
|
||||
wireshark
|
||||
traceroute
|
||||
];
|
||||
}
|
||||
|
@ -18,7 +18,6 @@
|
||||
shellAliases = {
|
||||
cd = "z";
|
||||
ls = "eza";
|
||||
awkuniq = "sort | uniq";
|
||||
histogram = "awkuniq -c | sort -nr";
|
||||
json-less = "jq -C . | less -R";
|
||||
csv2json = "python -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))'";
|
||||
@ -61,6 +60,15 @@
|
||||
if [[ -n "$SSH_CONNECTION" && "$TERM" == "ghostty" ]]; then
|
||||
export TERM="xterm-256color"
|
||||
fi
|
||||
|
||||
awkuniq() {
|
||||
if [[ "$1" == "-c" ]]; then
|
||||
awk '{ !x[$0]++ } END { for (i in x) print x[i] "\t" i }'
|
||||
else
|
||||
awk '!x[$0]++'
|
||||
fi
|
||||
}
|
||||
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user