I have input file like
AAA
AAA
CCC
CCC
CCC
EEE
EEE
EEE
EEE
FFF
FFF
GGG
GGG
i was trying to retrieve data between two strings using sed.
sed -n /CCC/,/FFF/p input_file
Am getting output like
CCC
CCC
CCC
EEE
EEE
EEE
EEE
FFF
The above command retrieves the data till to the first occurence of the destination string (i.e., till 1st occurence off FFF record)
I need to search the records till last occurence.
Expected output is
CCC
CCC
CCC
EEE
EEE
EEE
EEE
FFF
FFF
Plz help on this query.