diff options
author | David Wührer <def@gmx.at> | 2023-07-03 15:48:48 +0200 |
---|---|---|
committer | David Wührer <def@gmx.at> | 2023-07-03 15:48:48 +0200 |
commit | 4e0ac4acb97308b782c39d1137f03a56f635c88f (patch) | |
tree | 3bbb7f7709f4933529d52a01989891d153517da4 | |
parent | 044b08d127cef08545f831a0c4960d450680679b (diff) |
pivot, strjoin
-rwxr-xr-x | pivot | 11 | ||||
-rwxr-xr-x | strjoin | 6 |
2 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,11 @@ +#!/usr/bin/awk -f + +{ + split ($0, _columns, "\t") + for (i=0;i<length(_columns);++i) { + columns[i] = columns[i] "\t" _columns[i] +} } +END { + for (i=0;i<length(columns);++i) { + print substr(columns[i],2) +} } @@ -0,0 +1,6 @@ +#!/bin/sh +sep=$1 +shift +printf '%s' "$1" +shift +printf "$sep"'%s' "$@" |