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

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -