RetroZilla/directory/c-sdk/ldap/build/replace.pl
2015-10-20 23:03:22 -04:00

24 lines
485 B
Perl

#
# replace.pl: perform simple string substitution on a file
# the first line in the input (template) file is also discarded.
#
# usage: perl replace.pl KEYWORD=VALUE... < TMPLFILE > OUTFILE
#
# created 17 October 2001 by Mark Smith <mcs@netscape.com>
use File::Basename;
push @INC, dirname($0);
require replace;
%keywords = {};
foreach $str (@ARGV) {
($key,$val) = split( "=", $str, 2 );
$keywords{$key} = $val;
}
replace::GenerateHeader(*STDIN, *STDOUT, \%keywords);
exit 0;