Re: string to date KSH
- From: Stephan Grein <stephan@xxxxxxxxxxxxxxxx>
- Date: Thu, 26 Oct 2006 17:14:19 +0200
Rafael The Engel wrote:
Hello everyone,Maybe you like sed. ;-)
I need your help
I have a string the contains a date "20061024"
I wand to convert it to 24/10/2006
sed
's/\([[:digit:]]\{4\}\)\([[:digit:]]\{2\}\)\([[:digit:]]\{2\}\)/\3\/\2\/\1/'
<<< "20061024"
sed 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\3\/\2\/\1/' <<<
"20061024"
Thanks
Rafael
HTH,
--
Stephan Grein, <stephan at stephan minus rockt dot de>
https://stephan-rockt.de
GnuPG-Key-ID: 0xF8C275D4
FingerPrint: 5B6F 134A 189B A24D 342B 0961 8D4B 0230 F8C2 75D4
.
- Follow-Ups:
- Re: string to date KSH
- From: Michael Tosch
- Re: string to date KSH
- From: Stephan Grein
- Re: string to date KSH
- References:
- string to date KSH
- From: Rafael The Engel
- string to date KSH
- Prev by Date: Re: listing nondirectories
- Next by Date: Re: string to date KSH
- Previous by thread: Re: string to date KSH
- Next by thread: Re: string to date KSH
- Index(es):
Relevant Pages
|