Jump to content

Featured Replies

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...