Re: File Size Calculator

2004-08-10 Thread Brian Gerard
And the clouds parted, and Brian Gerard said... > > [1] http://www.alcyone.com/max/reference/physics/binary.html > -anyone remember offhand the URL to the /. story on these, btw? > ...never mind. Found it. (uncaught typo on my first google query... DOH!) http://slashdot.org/articles/99/

RE: File Size Calculator

2004-08-10 Thread Charles K. Clarkson
SilverFox <[EMAIL PROTECTED]> wrote: : : I haven't put anything together as yet. Putting : some if/elsif statement together would be the : easiest way I can think off. Something like: We can see a few problems right off. All scripts should start with 'strict' and 'warnings'. We need a consi

Re: File Size Calculator

2004-08-10 Thread Brian Gerard
And the clouds parted, and SilverFox said... > > Hi all, I'm trying to writing a script that will allow a user to enter a > number and that number will be converted into KB,MB or GB depending on the > size of the number. Can someone point me in the right direction? > > Example: > user enter: 59

Re: File Size Calculator

2004-08-10 Thread mgoland
Quickest wya would be to get the left over from begining. ... print "Please enter your number:\n"; chomp($num=); $bytes = $num % $kilo; $num -= $bytes ... HTH, Mark G. - Original Message - From: SilverFox <[EMAIL PROTECTED]> Date: Monday, August 9, 2004 12:06 pm Subjec

Re: File Size Calculator

2004-08-10 Thread SilverFox
Jose Alves De Castro wrote: > On Mon, 2004-08-09 at 14:53, David Dorward wrote: >> On 9 Aug 2004, at 14:34, SilverFox wrote: >> >> > Hi all, I'm trying to writing a script that will allow a user to enter >> > a >> > number and that number will be converted into KB,MB or GB depending on >> > the >

Re: File Size Calculator

2004-08-09 Thread Chris Devers
On Mon, 9 Aug 2004, SilverFox wrote: Example: user enter: 59443 Script will output: 58M I know this isn't getting into the spirit of things, but have you considered simply using the `units` program? % units 500 units, 54 prefixes You have: 59443 bytes You want: megabytes

Re: File Size Calculator

2004-08-09 Thread Jose Alves de Castro
On Mon, 2004-08-09 at 14:53, David Dorward wrote: > On 9 Aug 2004, at 14:34, SilverFox wrote: > > > Hi all, I'm trying to writing a script that will allow a user to enter > > a > > number and that number will be converted into KB,MB or GB depending on > > the > > size of the number. Can someone

Re: File Size Calculator

2004-08-09 Thread David Dorward
On 9 Aug 2004, at 14:34, SilverFox wrote: Hi all, I'm trying to writing a script that will allow a user to enter a number and that number will be converted into KB,MB or GB depending on the size of the number. Can someone point me in the right direction? What have you got so far? Where are you st

File Size Calculator

2004-08-09 Thread SilverFox
Hi all, I'm trying to writing a script that will allow a user to enter a number and that number will be converted into KB,MB or GB depending on the size of the number. Can someone point me in the right direction? Example: user enter: 59443 Script will output: 58M SilverFox -- To unsubscribe