diff options
Diffstat (limited to 'each')
-rwxr-xr-x | each | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#!/usr/bin/perl + +$i = 0; +for (@ARGV) { + if (/^;$/) { + $i++; + next; + } + s/"/"'"'"/g; + s/\$/\\\$/g; + s/\\\$\+/\$/g; + $commands[$i] .= "\"$_\" " +} + +while (<STDIN>) { + chomp($ENV{x} = $_); + system($_) for @commands; +} |