Can we get one more CLI program into the base system? (bc)

I am missing the CLI program bc in the base system. It’s quite useful to have an option to calculate things on the command line. Something like find /mnt/tank -iname '*.mkv' -o -iname '*.mp4' -ls | tr -s ' ' | cut -d ' ' -f 8 | paste -sd + | bc or find /mnt/tank -iname '*.mkv' -o -iname '*.mp4' -printf "%s\n" | paste -sd + | bc is quite useful to get the size of all videos, for example.

The binary is less than 100 kB size. Shouldn’t weigh down the install image too much. AFAIK, it’s part of the POSIX standard, so I think it should be included in a proper system anyway.

1 Like

Feature Request here, awaiting more votes:

2 Likes

Voted.

I’m fully with you to have enough cli basics (bsd+extra+gnu) as not everything is done in some web thingie.

Btw, (i hope this doesn’t make bc it less important *g*)

find /mnt/p0/media/movies -iname '*.mkv' -o -iname '*.mp4' -print0 | xargs -0 du -sch |tail -n 1
find /mnt/p0/media/movies -iname '*.mkv' -o -iname '*.mp4' -ls | tr -s ' ' | cut -d ' ' -f 8 | awk '{ sum += $1 } END { printf "%.2f MB\n", sum/1024^2}'

And there are probably much more.

/me is still runnins his ~30 core systems as scale is still not interesting