If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions

Friday, October 23, 2009

binary

#!/bin/bash
# Show binary representation of a number

if [ $# -ne 1 ]; then
echo "usage: `basename $0` NUMBER" 1>&2
exit 1
fi

echo "obase=2; $1" | bc -l
Post a Comment

Blog Archive