mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
12 lines
225 B
Perl
Executable File
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 $_;
|
|
} |