I would like to be able to reduce the output from my script and then if possible to query the End Code to write to the user if the End Code is correct.

This is the code im currently using:

```
foreach ($line in $contentt) {
  Write-Host $line -BackgroundColor DarkGray -ForegroundColor Black

  $date = Get-Date -format "MMM dd"
  $yday = (Get-Date).AddDays(-1).ToString("MMM dd")
  $output  = Get-Content -Path "$line" |
             Select-String -Pattern $date -SimpleMatch |
             Select-String -Pattern "End Code" 
  $youtput = Get-Content -Path "$line" |
             Select-String -Pattern $yday -SimpleMatch |
             Select-String -Pattern "End Code"
  if ($output -eq $null) {
    Write-Host "No content in the file for today"
  } else {
    Write-Host $output
  }
  if ($youtput -eq $null) {
    Write-Host "No content in the file for yesterday"
  } else {
    Write-Host $youtput
  }
}

```

This is the output im currently receiving:

```
Jan 26, 2015 7:34:37 AM JobName  - ID  = 15 , End Code   = 0 , time (ms)  = 2046
```

I would like to be able to trim the output to be:

```
EndCode = 0
```