On Fri, 12 Sep 2014, random832(a)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@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.