repo.or.cz
/
sunny256-utils.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
mktar: Use `wc` instead of `du` in summary message
[sunny256-utils.git]
/
inc_epstat
blob
a06a0008c495bf54e2383c8ebb1d5bbe1365e54a
1
#!/usr/bin/env perl
2
3
# inc_epstat
4
# File ID: afd0e776-5d3d-11df-9265-90e6ba3022ac
5
# Filter for å gjøre epstat-format brukbart i gnuplot.
6
# -f skriver telleren foran istedenfor etter.
7
8
use
warnings
;
9
use
Getopt
::
Std
;
10
11
our
$opt_f
=
0
;
12
my
$Count
=
0
;
13
14
getopts
(
'f'
);
15
16
if
(
$opt_f
) {
# For å få opp farta
17
while
(<>) {
18
s/^(.+)/$Count\t$1/
;
19
print
;
20
$Count
++;
21
}
22
}
else
{
23
while
(<>) {
24
s/^(.+)/$1\t$Count/
;
25
print
;
26
$Count
++;
27
}
28
}