view bin/acut @ 80:db3c689175fe

catching up by hand with markup version, adding query string
author Henry Thompson <ht@markup.co.uk>
date Sat, 19 Aug 2023 15:53:59 -0400
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/\$/,\$}\}