IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New That was all an inside joke, right?
There weren't enough characters there to actually do anything useful.
--

Drew
New no works as advertized
If we torture the data long enough, it will confess. (Ronald Coase, Nobel Prize for Economic Sciences, 1991)
New Sigh
Must be pebkac.

Current dir:
$ l
total 12
-rwxr-xr-x 1 broom broom 162 2010-03-26 19:55 add_file_size.pl
-rwxr-xr-x 1 broom broom 608 2010-03-26 19:55 make_self_contained.pl
-rwxr-xr-x 1 broom broom 657 2010-03-26 19:55 maketests.pl

Execute it:
$ find . -print | ./add_file_size.pl
Total: 1427

Figure what the sizes should be:
$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
162+608+657
1427

It matches.

The script file contains the following:

$ cat add_file_size.pl

#!/usr/bin/perl -w
#
use strict;

my $size = 0;
while(<>){
chomp;
next unless (-f $_);
my $file_size = -s $_;
$size += $file_size;
}
print "Total: $size\n";


New sorry, no, works as advertized. My bad forgot comma
If we torture the data long enough, it will confess. (Ronald Coase, Nobel Prize for Economic Sciences, 1991)
New Don't show it to Ben.
He'd do it in one line. More line noise than characters. And it would be brilliant.
     aarrgg, brain dead - (boxley) - (33)
         {print $5+1}? Or did I totally misread the question? -NT - (scoenye) - (32)
             trying to get a running total, not increment - (boxley) - (31)
                 Here, feed this filenames. - (crazy) - (8)
                     I dont quite get this - (boxley) - (7)
                         -s - (crazy) - (6)
                             Ah, got it. thanx! -NT - (boxley) - (5)
                                 That was all an inside joke, right? - (drook) - (4)
                                     no works as advertized -NT - (boxley) - (2)
                                         Sigh - (crazy) - (1)
                                             sorry, no, works as advertized. My bad forgot comma -NT - (boxley)
                                     Don't show it to Ben. - (crazy)
                 Or like this... (using find) - (scoenye) - (21)
                     Yup, find is magic - (crazy) - (10)
                         s/magic/magic mushrooms/ - (pwhysall)
                         My feelings exactly aboout Perl ;-) - (scoenye) - (8)
                             I've tried to learn Perl several times. - (static) - (7)
                                 Learning Perl is like learning a core language facility - (crazy) - (6)
                                     What's the point? - (malraux) - (5)
                                         Ah, welcome to the expanding fray - (crazy) - (4)
                                             I hopped from Perl to Python... - (pwhysall) - (2)
                                                 Yeah, but - (crazy) - (1)
                                                     No, it's fine. I don't consider myself a programmer. - (pwhysall)
                                             Quite. - (static)
                     I like - (boxley) - (1)
                         The - means "standard input" - (scoenye)
                     oh well doesnt work in solaris - (boxley) - (7)
                         apt-get install ubuntu FTW! -NT - (drook) - (3)
                             sorry, we have standards, snicker -NT - (boxley) - (2)
                                 GNU find from blastwave? -NT - (pwhysall) - (1)
                                     That's how I'd go - (jake123)
                         Solaris style... - (scoenye) - (2)
                             thanx - (boxley) - (1)
                                 Happy to help - (crazy)

On bassline: Martina Nav... Navri... gosh, I wish she'd get married.
76 ms