Hi,
I want to identify the number of the line of the last occurance of the
string "End of Report" within a file.
#> more somefile
line1
line2
End of Report
line4
End of Report
line6
End of Report
#>
#> #!/bin/ksh
#> grep -in "End of Report" somefile | awk -F: '{print $1}'
results in
3 5 7
Is there a way to capture the last value (7), when you don't know how many
occurance? I have gnugrep loaded if that is a better command.
TRU64UNIX V5.1A sp4
Best Regards,
Blake Brehl
Sys Admin/DBA
Anritsu Company United States
Morgan Hill, CA
Received on Thu Oct 23 2003 - 23:02:40 NZDT