[email protected] (RVP) writes: >The NetBSD sed doesn't understand '\t' as signifying a tab:
>You'll have to rewrite that regex like this:
>$ nl /etc/motd | sed 's/^ *\([0-9]*\)'$'\t''.*$/\1/'
The $'\t' syntax is also new. For old shells (e.g. NetBSD-8) you need to use
a literal TAB. Usually like:
TAB=' ' # <--- literal TAB
sed "s/^ *\([0-9]*\)${TAB}.*$/\1/"
--
--
Michael van Elst
Internet: [email protected]
"A potential Snark may lurk in every tree."
