UGU: Unix Guru Universe - Unix Tip #4348- February 5, 2017
- Home : Help
: Today's Tip
Unix Tip #4348- February 5, 2017
BC AND NOT BEFORE AD
Fire up our old friend and often forgotten bc.
Enter your arthimetic expression
but the best part is, use the
"obase" and "ibase" commands for all
your conversion needs.
For example, type:
This will output "FF".
Next, if you type:
Then a dot (or period), it stands for
"the last number")
It will return "11111111", that's 255 in binary!
If you need hex to dec,
just type "ibase=16" and "obase=10"
NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
LAST 5 TIPS
- LISTING FILES BY SIZE
- WHERE AM I ALWAYS
- WHO SENT ME MAIL
- STRINGS - OLD BUT A GOODIE
- RUN DAILY WITH AT
I want to
and get a UGU Tip everyday.
I want to
and NOT get a UGU Tip everyday.
If you have a UNIX TIP let us know, we just may use it:
(All tips become the property of the Unix Guru Universe)
Copyright 1994-2011 Unix Guru Universe