From: "Aleksey E. Birukov" <birukov@vladinfo.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Date format
Date: Fri, 27 Jun 2008 21:10:36 +0400
Message-ID: <48651F0C.8080002@vladinfo.ru> (raw)
In-Reply-To: <4864F0C0.5020502@vladinfo.ru>
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'
next prev parent reply other threads:[~2008-06-27 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 13:53 Aleksey E. Birukov
2008-06-27 17:10 ` Aleksey E. Birukov [this message]
2008-06-27 20:21 ` Sergey Shilov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48651F0C.8080002@vladinfo.ru \
--to=birukov@vladinfo.ru \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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