Here's a cute way to generate Bitcoin key pairs using only bash and some fairly standard command line utilities (disclaimer: I wouldn't use it to generate production keys).
https://gist.github.com/colindean/5239812
This was actually put together at the Bitcoin dawn of time by a bitcointalk user called grondilu.
Here's the original (circa 2010) thread: