Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Equivalent of Unix in Powershell

$
0
0

Hi there,

What it does is to get the parameter which contains ..Message and ignore and the use the comma seperator to get the first and the fourth field. I understand there is no awk in powershell, so how do I get the first and the fourth output.

fileset='services_nac1051.csv services_nac1053.csv services_nac1055.csv'
echo '1.1.1.1.1;'     `grep -ia '^Message Queuing down Level clients' $fileset | awk -F ',' '{print $1 ","} {print $(NF-1)}'`


Viewing all articles
Browse latest Browse all 6937

Trending Articles