Have a very simple powershell script to count the number of trades in a file:
(gc \mimkeimc11n\Batch\FundQuest\TradeFiles\trades.dat |? {$_ -match 'SL|BY'} | Measure-Object | select count).count > \mimkeimc11n\Batch\FundQuest\ConfirmtoFQ\NumberofTrades.txt
The problem I am running into is the output NumberofTrades.txt is including the number that I want, but also a CR LF, not sure why??? Any help would be greatly appreciated.