From 3f7eaa11ecfbb1834b50e279f9c5fa0915f8f4ef Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 23 Feb 2014 14:06:54 -0800 Subject: [PATCH] awk script to print a single value for each key --- sh/sv | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 sh/sv diff --git a/sh/sv b/sh/sv new file mode 100755 index 0000000..909c938 --- /dev/null +++ b/sh/sv @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +awk "-F${1:- }" ' +NF>1{f[$1]=substr($0,length($1)+1+length(FS))}END{for(k in f)print k FS f[k]} +'