Bind every line from two variables in a third variable in powershell -


i got 2 variables, filled with:

$var1: dog cat bird  $var2: makes wau makes miau makes beep 

how can mix both of them like:

$var3 dog makes wau cat makes miau bird makes beep 

$var3 = $var1 + $var2 dosen't work

this rapid way (variables's lenght must equal):

$i = 0 ; $var3 = $var1 | % { "$_ $($var2[$i])"; $i++ } 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -