korn shell script question
From: Brehl, Blake (Blake.Brehl_at_anritsu.com)
Date: 10/24/03
- Previous message: Reed, Judith: "SUMMARY: How big can max_per_proc_address_space/data_size actually be?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Oct 2003 16:00:21 -0700 To: "Tru64 Mailing List (tru64-unix-managers@ornl.gov)" <tru64-unix-managers@ornl.gov>
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
- Previous message: Reed, Judith: "SUMMARY: How big can max_per_proc_address_space/data_size actually be?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|