Jump to content

Recommended Posts

Guest corfuitl
Posted

Hi all,

 

I have a text that contain dates and maybe number of chapters that look like a date and I would like to convert the dates in another format if they are valid.

 

For example, the text

 

Code:

Today is 2.6.2014 and I read the chapter 32.1.14

should be converted into

 

Code:

Today is 2/6/2014 and I read the chapter 32.1.14

I know to use the date -d "$date" but I don�t know how to keep the date in a var and then make the replacement.

 

Do you have any idea?

 

Thanks for your time.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...