Modified prediff-for-pgi-warnings to preserve the incomplete last line if any.
Modified prediff-for-pgi-warnings to preserve the incomplete last line if any.

In the following tests, for example:

 io/ferguson/writeint.chpl
 io/ferguson/writestring.chpl
 trivial/bradc/declprintint.chpl
 types/file/fwriteIntFile.chpl
 types/file/fwriteIntStdout.chpl
 types/file/fwriteMultipleInts.chpl

the last line of the expected program output does not have the newline.
prediff-for-pgi-warnings used to apply 'grep' to program output,
which adds a newline to the last line if it does not have one.
This triggered test failures for the above when we apply
prediff-for-pgi-warnings as a system-wide prediff.

While one would expect 'grep' to have a switch that turns off the addition
of a missing newline, we did not find it. So instead I switched to perl.
(I also took advantage of perl's ability to modify the file in-place.)

Greg suggested alternatively:
  sed -n -e 's/YOUR_PATTERN/p'
but it did not work for me immediately (I am not as fluent with sed).


git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@21094 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,sungeunchoi/chapel,sungeunchoi/chapel,hildeth/chapel,chizarlicious/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel,chizarlicious/chapel,chizarlicious/chapel,sungeunchoi/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,hildeth/chapel,hildeth/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,hildeth/chapel,chizarlicious/chapel,hildeth/chapel