1
I have code:
$dir=(new-object Net.WebClient).DownloadString("http://www.nbp.pl/kursy/xml/dir.txt")
$dir | foreach {
if ($_.startswith("a"))
{
write-host $_
}
}
and I need to select only lines that begin with a
character. This script is not working, it does not print anything. What should I change in this script to make it work?
Great! Can I remove all not
a
beginning lines from$dir
? – pbies – 2016-12-03T22:44:14.990Not sure what the new question is about... Of course you can. – techraf – 2016-12-03T22:58:32.057