Up until FreeBSD 13.0, bc had no "prompt" for interactively entered math text. This made it very easy to copy-n-paste using quick mouse clicks when one wanted to reuse a math statement. Now with 13.0, one cannot do that any longer due to very annoying leading ">>>" text. Pre-13.0: $ bc 1+2+3+4+5+6+7 28 1+2+3+4+5+6+7 + 8 36 13.0: $ bc >>> 1+2+3+4+5+6+7 28 >>> >>> 1+2+3+4+5+6+7 + 8 Parse error: bad token <stdin>:2 I am aware of the fact that 13.0 changed from a 2010 BSDL bc (FreeBSD 9.0-12.2) and that replaced GNU bc used since 1993 (FreeBSD 1.x-11.4). However, since the Google SoC and GNU bc has behaved this way since FreeBSD 1.0, their replacement should behave as close to expected FreeBSD behavior as possible.
This is no longer the case on main, stable/13 and releng/13.1. https://cgit.freebsd.org/src/commit?id=44d4804d1945435745518cd09eb8ae6ab22ecef4 % $ uname -r 13.1-STABLE $ bc --version bc 5.2.2 % bc 1+2 3 Your options on releng/13.0 are: - run bc with -P (alias?) - rebuild world with WITHOUT_GH_BC=yes - build bc from usr.bin/bc - Modify usr.bin/gh-bc/Makefile and rebuild gh-bc --- a/usr.bin/gh-bc/Makefile +++ b/usr.bin/gh-bc/Makefile @@ -34,7 +34,7 @@ NLSSRCDIR= ${BCDIR}/locales CFLAGS+= -DMAINEXEC=${PROGNAME} CFLAGS+= -DNLSPATH=/usr/share/nls/%L/%N.cat CFLAGS+= -DBC_ENABLED -CFLAGS+= -DBC_ENABLE_PROMPT +CFLAGS+= -DBC_ENABLE_PROMPT=0
+1 from here, I was very surprised by this after 13.0 upgrade and happy to see it go away.