[TUHS] Etymology of bc(1)
Steve Nickolas
usotsuki at buric.co
Sat Sep 13 00:18:03 AEST 2014
On Fri, 12 Sep 2014, random832 at fastmail.us wrote:
> What language does the undocumented option (assuming it is supported at
> all) "bc -c" generate on FreeBSD and OSX? "Standard" bc, which actually
> pipes to dc, generates (obviously) dc when run in this way, but GNU bc
> generates a completely different and as far as I know undocumented
> language, which is handled by the execute function (in execute.c) but as
> far as I know there is no way to make it accept it on standard input.
>
> Standard bc:
> $ echo '2+2' | bc -c
> 2 2+ps.
> q$
>
> GNU bc:
> $ echo '2+2' | bc -c
> @iK2:K2:+W at r
> @i
> $
FreeBSD 10:
$ echo '2+2'|bc -c
2 2+ps.
q$
(yeah, I run ash... I got a chroot with Debian and the different userlands
would cause conflict if I defaulted to bash)
-uso.
More information about the TUHS
mailing list