view bin/acut @ 151:3ba401110c22 mergefix

handle -m case, support src from cmdline
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 04 Oct 2023 20:04:34 +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/\$/,\$}\}