dotfiles

configuration files
git clone https://pi.duncano.de/git/dotfiles.git
Log | Files | Refs | README

commit 4f764ea856073b363639d1a9f417d87868e2c5a4
parent ece5465cc049382efdc4743ec687cad2bf994ded
Author: Duncaen <mail@duncano.de>
Date:   Mon, 13 Feb 2017 02:40:28 +0100

bin: add twoman

Diffstat:
bin/twoman | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/bin/twoman b/bin/twoman @@ -0,0 +1,17 @@ +#!/bin/sh +# twoman CMD... - show comment at line >2 +for x; do + path=$(command -v "$x" 2>/dev/null) + [ -z "$path" ] && continue + magic="$(dd if="$path" bs=2 count=1 2>/dev/null | od -An)" + magic=$(printf '%d' "$magic") + case "$magic" in 8483) ;; *) continue;; esac + awk ' +BEGIN {x=1} +END {print "--"} +NR>=2 && x { + x=sub("^#[ ]?","") + if(x){print} +} +' "$path" +done