* [Sysadmins] Date format
@ 2008-06-27 13:53 Aleksey E. Birukov
2008-06-27 17:10 ` Aleksey E. Birukov
0 siblings, 1 reply; 3+ messages in thread
From: Aleksey E. Birukov @ 2008-06-27 13:53 UTC (permalink / raw)
To: sysadmins
Нужно перевести даты из лог файла формата "20.06.2008" в unix time.
Загвоздка в том, что date -d ... +%s понимает только (?) формат
"2008-06-20". Другого я от него добиться не смог сколько маны не читал.
Есть ли возможность простым способом переформатировать даты?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Sysadmins] Date format
2008-06-27 13:53 [Sysadmins] Date format Aleksey E. Birukov
@ 2008-06-27 17:10 ` Aleksey E. Birukov
2008-06-27 20:21 ` Sergey Shilov
0 siblings, 1 reply; 3+ messages in thread
From: Aleksey E. Birukov @ 2008-06-27 17:10 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
Aleksey E. Birukov пишет:
> Нужно перевести даты из лог файла формата "20.06.2008" в unix time.
> Загвоздка в том, что date -d ... +%s понимает только (?) формат
> "2008-06-20". Другого я от него добиться не смог сколько маны не читал.
> Есть ли возможность простым способом переформатировать даты?
Сделал так:
echo "21.06.08 text" | sed 's/^\(..\)\.\(..\)\.\(..\)/20\3-\2-\1/g'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-27 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-27 13:53 [Sysadmins] Date format Aleksey E. Birukov
2008-06-27 17:10 ` Aleksey E. Birukov
2008-06-27 20:21 ` Sergey Shilov
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git