Content added Content deleted
imported>mutante mNo edit summary |
imported>mutante mNo edit summary |
||
Line 1: | Line 1: | ||
#/bin/[[bash]] |
#/bin/[[bash]] |
||
echo "23 decimal is `echo 'obase=16; ibase=10; 23' | bc` in hex." |
echo "23 decimal is `echo 'obase=16; ibase=10; 23' | bc` in hex." |
Revision as of 14:16, 7 April 2006
#/bin/bash
echo "23 decimal is `echo 'obase=16; ibase=10; 23' | bc` in hex." 23 decimal is 17 in hex.
echo "23 in hex is `echo 'obase=10; ibase=16; 23' | bc` in decimal." 23 in hex is 35 in decimal.
echo "666 in octal is `echo 'obase=10; ibase=8; 666' | bc` in decimal." 666 in octal is 438 in decimal.
echo "77 base 7 is `echo 'obase=10; ibase=7; 77' | bc` in decimal." 77 base 7 is 48 in decimal.
echo "10111 binary is `echo 'obase=10; ibase=2; 10111' | bc` in decimal." 10111 binary is 23 in decimal.
echo "There are only `echo 'obase=10; ibase=10; 10' | bc` types of people in the world. Those who understand binary, and those who don't". There are only 10 types of people in the world. Those who understand binary, and those who don't.
...