view bin/acut @ 56:f8c8f79b2532

rework completely to refill as much as possible only when necessary, basic loop working again, but not refill
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Mon, 10 Jul 2023 19:52:18 +0100
parents 75e0d0013da0
children
line wrap: on
line source

#!/bin/bash
# Use awk to do cut -d whitespace
declare ff=("$@")
join_array() { local IFS=\$; echo "$*"; }
s=$(join_array "${ff[@]}")
awk '{print '\$${s/\$/,\$}\}