On 3/1/22 10:29, Gordon Messmer wrote:
Chris Schanzle mentioned off-list that a tab character had been replaced with spaces (I *knew* that should have been an attached file, shame on me). He also suggested an improvement that removes the tab character, so here's a second try.
Or not? Last try.
#!/bin/sh
declare -a cmdline tab=$'\t' eol=$'\n'
for arg in "$@" do arg="${arg//\011/$tab}" arg="${arg//\012/$eol}" arg="${arg//\040/ }" arg="${arg//\134/\}" arg="${arg//\\/\}" cmdline+=("$arg") done
"${cmdline[@]}"