From a127aa7a02cf8b53d8d5dd0cbb623f985f59ad52 Mon Sep 17 00:00:00 2001 From: pmichaud Date: Tue, 28 Aug 2012 03:24:06 -0500 Subject: Initial build makefile and script to prefix input lines. --- tools/star/prefix.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/star/prefix.pl (limited to 'tools/star/prefix.pl') diff --git a/tools/star/prefix.pl b/tools/star/prefix.pl new file mode 100644 index 0000000..c2dea0a --- /dev/null +++ b/tools/star/prefix.pl @@ -0,0 +1,12 @@ +#! perl + +# Add a prefix string (specified by $ARGV[0]) to all +# of the lines of the remaining files. Skips blank lines +# and lines beginning with a comment character. + +my $prefix = shift @ARGV; +while (<>) { + next if /^\s*(#|$)/; + print "$prefix$_"; +} + -- cgit v1.1