grep for portion of a line with specific syntax

I am having trouble trying to grep (or whatever is best) the date out of a specific output


499942634/1322025954/FFF035/11/23/2011 12:25:53 AM/full
3423594078/1326441742/FFF034/01/13/2012 02:37:07 AM/full


I was thinking use cut from position but the date is at two different positions in the two lines above.

Please let me know how to get that date!
Justin_EdmandsAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
farzanjConnect With a Mentor Commented:
With grep you could do something like

grep -Po '\d\d\/\d\d\/\d{4}' filename

Open in new window

0
 
farzanjCommented:
Try this:
cut -d'/' -f4-6 filename

Open in new window

0
 
Justin_EdmandsAuthor Commented:
almost, strip off the end?
0
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
Justin_EdmandsAuthor Commented:
perfect.
0
 
farzanjCommented:
Ok, Try this:
cut -d'/' -f4-6 filename | cut -d' ' -f1

Open in new window

0
 
Justin_EdmandsAuthor Commented:
Thank you very much.
0
 
farzanjCommented:
Glad to help :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.