> echo "$NUM" | sed -r ':a;s/^([-+]?[0-9]+)([0-9]{3})/\1,\2/;ta'
IMHO not the same thing, but if you're happy... 🤷🏻♂️
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
In reply to Re^3: Commify function regex in Perl vs sed (off-topic sed)
by LanX
in thread Commify function regex in Perl vs sed
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |