view bin/acut @ 83:d92bd8527718

use surt instead of trying to create index term by hand
author Henry Thompson <ht@markup.co.uk>
date Sat, 19 Aug 2023 16:33:23 -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/\$/,\$}\}