Article 6EX60 [SOLVED] grep for part of a date but return whole date

[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.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments