Re: Calculator with "tapes"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, Jul 23, 2018 at 01:01:51PM +0200, Stefan Krusche wrote:
[...]
> > BUT, when I run bc, I get:
> >
> > $ bc
> > bc 1.06.95
> > Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software
> > Foundation, Inc.
> > This is free software with ABSOLUTELY NO WARRANTY.
> > For details type `warranty'.
> > scale
> > 0
> > ^D
> >
> >
> > What am I doing wrong here?
Hm. Same for me...
> No idea... .bcrc saved? And readable? Sorry, can't help.
> Stefan
Note that there's no mention of .bcrc in bc's man page...
Neither in bc's info page.
Running under strace I only see it trying to access ~/.inputrc and
~/.terminfo.
It seems you'll have to provide the init file explicitly on the command
line -- or to set the BC_ENV_ARGS. This works for me:
echo "scale=0" > .my-bc-init-file # choose a better name :-)
BC_ENV_ARGS=.my-bc-init-file bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
scale
20
Season to taste :-)
Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAltVuqEACgkQBcgs9XrR2kZ90ACdFSWyurNuwDZ5X78H/O2RIstZ
gk0AnRI/UvFytcVqO6RxWuzTVJFARDp7
=3UHW
-----END PGP SIGNATURE-----
Reply to: