View Single Post
Old 01-06-2009   #5 (permalink)
Justin Rich


 
 

Re: output multiple arrays to file

Thanks! This was what I was looking for.


"Kryten" <Kryten68@xxxxxx> wrote in message
news:27853c17-c198-4a9a-a885-3a28a2570705@xxxxxx
Quote:

> Ahem. Or even:-
>
> $a = 1..10 ; $b = 11..20 ; $c = 21..30
> foreach ( $i in (0..($a.count -1)) ) {
> Add-Content -path "arraytest.txt" `
> -value "$($a[$i])`r`n$($b[$i])`r`n$($c[$i])"
>
> }
>
> Cheers,
> Stuart
>

My System SpecsSystem Spec