4 ms·
What do you mean "bc is useless". I use it all the time!!
by diebir 5y ago
What do you mean "bc is useless". I use it all the time!!
- mjb 5y agoMe too, although R has become my command-line calculator of choice for most tasks. Being able to calculate things without moving my hands over to a calculator or calculator app is convenient.
- dylan604 5y agoClassic example of "I can't think of a use, so it must be useless". bc is very useful, and I can think of several times one might need a command line calculator. Commands like 'arch' might provide a limited amount of data from a different command. However, to extract just the data from the larger response would then require a string of grep/sed/awk. or call the one command to give you the output you specifically need. This also holds true for the 'uname' section.
- kruxigt 5y agoYeah. And if you're on IT support over phone/chat it's easier to ask them to write arch than something really strange and then ask them to find the right information in the mumbo jumbo it spits out.
- linguae 5y agoI use dc all the time, which the article denounced as even worse. dc gets more usage on my machines than most other commands, except for perhaps ls, cd, and vi. Whenever I need to make quick calculations on my computer, it is much more efficient for me to open up a terminal window and type dc than it is for me to use a GUI calculator or to grab my HP-48 graphing calculator. I suppose I could use a Python or Common Lisp REPL, but I love Reverse Polish Notation: less typing!
- olodus 5y agoYeah that one was really weird. I mean I personally usually start python or some other repl when I need to calculate something but I have reached for bc/dc sometimes aswell. And what's with the jab against RPN? The author should probably try some FORTH to learn how nice and minimal code in postfix notation can be. I'm guessing he doesn't like LISP either...
- kps 5y ago“Almost everyone, even a long time ago, had handheld calculators at their disposal.” Can't pipe the input and output of a handheld calculator. “The only date I could find in the man pages is 2006” `bc` was in 6th edition Unix, so 1974 or 1975.
- ajford 5y agoI strongly feel like this author hasn't written a shell script in a while... Maybe ever?
- dsr_ 5y agoTo be fair, most weeks I don't use bc. I did use it earlier today, though, because I was already at a terminal, so why go elsewhere?