mcom: commajoin: use awk

The sed solution did not work with OpenBSD sed and Plan9 sed when only
one line was used.
pull/37/head
Leah Neukirchen 7 years ago
parent 36e9a1afb0
commit df7cd7249c

@ -2,7 +2,9 @@
# mcom [TO] - compose mail
commajoin() {
sed ':a;N;s/\n/, /;$!b a'
awk 'NR==1 {l=$0; next}
{l=l", "$0}
END {print l}'
}
notmine() {

Loading…
Cancel
Save