[Wolves] c plus plus code

Stephen Parkes sparkes at westmids.biz
Sat Sep 17 21:21:59 BST 2005


roundyz wrote:

> 
> So how'd I do it? I got some of it from teach yourself c++ in 24 hours. 
> bullshit it took me an hour just to get that. 

#!/bin/sh
echo bitrate required  $(($(($1-$2))/$3))

save the above as bitrate.sh and set it executable

bitrate.sh discsize audiosize videolength

should output the same result as the code you where writing but without 
the overhead of starting the whole iostream libs

I'm a total no hoper with bash so I am sure there are much neater ways 
to do this but I choose shell because everyone has it and it's normally 
the environment they are using.

sparkes


-- 

It is easier to write an incorrect program than understand a
    correct one.
   -- Alan Perlis



More information about the Wolves mailing list