mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-13 11:10:13 +01:00
24 lines
485 B
Perl
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;
|