python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to make `bc` output a desired number of base-2 binary digits
This outputs 101110
echo "obase=2; 46" | bc
How can I make it output 8 digits, like this? : 00101110
I learned the above usage of bc here: Bash shell Decimal to Binary base 2 conversion
See...
Gabriel Staples
Votes: 0
Answers: 3
awk not getting correct comparison result on data bash
I have a file file.txt,
ch.qos.logback:logback-classic 1.2.0
ch.qos.logback:logback-core 1.2.0
com.fasterxml.jackson.core:jackson-databind 2.10.0
com.fasterxml.jackson.core:jackson-databind 2.6.7
com....
Shubham Saroj
Votes: 0
Answers: 2
(standard_in) 1: syntax error in my bash script - bc error
I'm trying to create a calculator that makes basic math operations on shell script but it keeps returning me this syntax error (standard_in) 1: syntax error when I try to multiply two numbers, I trie...
Lucas Ludicsa
Votes: 0
Answers: 1