Difference between revisions of "Reading a file"
From MyWiki
Line 1: | Line 1: | ||
+ | <source lang="html4strict"> | ||
+ | $lines=Get-Content myfile.txt | ||
+ | $lines | | ||
+ | ForEach-Object{ | ||
+ | Test-Connection $_.Split(' ')[1] | ||
+ | } | ||
+ | </source> | ||
<source lang="html4strict"> | <source lang="html4strict"> | ||
$lines=Get-Content myfile.txt | $lines=Get-Content myfile.txt |
Revision as of 15:36, 16 June 2014
$lines=Get-Content myfile.txt $lines | ForEach-Object{ Test-Connection $_.Split(' ')[1] }
$lines=Get-Content myfile.txt $lines | ForEach-Object{ Test-Connection $_.Split(' ')[1] }