From de42530ff645e2365a6d39b145f29d744b28d24a Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Sun, 13 Oct 2013 18:36:50 +0200 Subject: bashrc: new catn function --- conf/bashrc-laurent-public | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/bashrc-laurent-public b/conf/bashrc-laurent-public index ea9ce02..b897fa9 100644 --- a/conf/bashrc-laurent-public +++ b/conf/bashrc-laurent-public @@ -61,6 +61,7 @@ alias aptu='sudo apt-get update' alias ran='dd if=/dev/urandom count=500 bs=1 status=noxfer 2>/dev/null |md5sum -b |cut -d" " -f1' alias rans='tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16 | xargs' function catn() { for i in $@; do echo "============================================================================"; echo $i; echo "============================================================================"; cat $i; done; } +function catn_new() { find $@ |while read a; do [[ -f $a ]] && echo -e "\n====== $a =====" && cat $a || echo -e "\n>>>>>> $a <<<<<<"; done |less; } function wirr() { filter=${3-"not port 22"}; ssh -o User=root $1 tcpdump -i $2 -s 1500 -w - -U "$filter" | wireshark -i - -k; } function tshr() { host=$1 iface=$2 filter=${3-"not port 22"}; f=/tmp/tshr-fifo; echo "mkfifo $f; tshark -n -r $f"; echo "ssh -o User=root $host tcpdump -i $iface -s 1500 -w - -U $filter > $f"; echo "rm $f"; } function wpasup() { ifran $1; sudo wpa_supplicant -Dwext -i$1 -c/etc/wpa_supplicant/wpa_supplicant.conf; } -- cgit v1.2.3-59-g8ed1b