summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsponge12
1 files changed, 12 insertions, 0 deletions
diff --git a/sponge b/sponge
new file mode 100755
index 0000000..aa1289c
--- /dev/null
+++ b/sponge
@@ -0,0 +1,12 @@
+#! /usr/bin/perl -w
+
+# Origin: http://riva.ucam.org/svn/cjwatson/bin/sponge
+
+use strict;
+
+binmode STDIN;
+undef $/;
+my $input = <STDIN>;
+open OUT, "> $ARGV[0]" or die "couldn't open $ARGV[0]: $!";
+print OUT $input or die "couldn't write to $ARGV[0]: $!";
+close OUT or die "couldn't close $ARGV[0]: $!";