[SOLVED] grep for part of a date but return whole date
by solidbulk from LinuxQuestions.org on (#6EX60)
I am trying to grep through a file which has multiple date timestamps.
I want to grep using a string like 202309 but return the whole date.
The date goes 6 more positions to the right.
For example 202309190615
202309180415
202309170615
if possible I would like to take it one step further returning only unique timestamps in the output.
I want to grep using a string like 202309 but return the whole date.
The date goes 6 more positions to the right.
For example 202309190615
202309180415
202309170615
if possible I would like to take it one step further returning only unique timestamps in the output.