git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e715d59
)
Invokes specified command on each separate mail from the folder separately
author
short
<>
Tue, 10 Jul 2001 18:38:34 +0000
(18:38 +0000)
committer
short
<>
Tue, 10 Jul 2001 18:38:34 +0000
(18:38 +0000)
bin/From-split.perl
[new file with mode: 0755]
patch
|
blob
diff --git a/bin/From-split.perl
b/bin/From-split.perl
new file mode 100755
(executable)
index 0000000..
6df4389
--- /dev/null
+++ b/
bin/From-split.perl
@@ -0,0
+1,18
@@
+#! /usr/bin/perl -w
+use strict;
+use vars qw/$cmd/;
+
+$/="\nFrom ";
+$|=1;
+while (<STDIN>) {
+ s/^From //s;
+ s/From $//s;
+ $_="From ".$_;
+ $cmd=$ARGV[0];
+ $cmd=~s/%/$./;
+ open(OUT,"|".$cmd.";cat >/dev/null") or die "Cannot open $cmd";
+ print OUT $_ or die "Cannot write";
+ close(OUT) or die "Cannot close";
+ print STDOUT ".";
+ }
+print STDOUT " done.\n";