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