csv - Powershell using where-object -


i using powershell , having trouble where-object cmdlet. select * , want output when field equal alabama. field under column, not one.

this have:

select * | {$_.state_name -eq 'alabama'} .  

this works state_name, cant columns without doing them individually. i've tried where{$_ -eq....} doesn't work.

kind of hack, but:

select * | {($_ | convertto-csv -notypeinformation)[1] -like '*"alabama"*'} 

Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -