ede/ede-panel/applets/start-menu/tests/expand
2009-10-03 07:33:08 +00:00

12 lines
225 B
Perl
Executable File

#!/usr/bin/perl
# This script performs expansion of environment variables of the form ${HOME}
while(<>)
{
while (($a) = ($_ =~ /[^\$]*\$\{([^\}]*)\}.*/))
{
s/([^\$]*)(\$\{$a\})(.*)/$1$ENV{$a}$3/;
}
printf $_;
}