Content added Content deleted
imported>mutante mNo edit summary |
imported>mutante mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
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." |
||
23 decimal is 17 in hex. |
23 decimal is 17 in hex. |
||
Line 16: | Line 16: | ||
10111 binary is 23 in decimal. |
10111 binary is 23 in decimal. |
||
echo "There are only `echo 'obase=10; ibase= |
echo "There are only `echo 'obase=10; ibase=2; 10' | bc` types of people ..." |
||
There are only |
There are only 2 types of people .. [http://www.thinkgeek.com/tshirts/frustrations/5aa9/] |
||
... |
etc ... |
||
[[Category:Linux]] |
[[Category:Linux]] |
Latest revision as of 14:19, 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=2; 10' | bc` types of people ..." There are only 2 types of people .. [1]
etc ...