From: "Дмитрий Бурмистров" <demon@nita-farm.ru> To: Saratov Linux User Group Maillist <sarlug@lists.lug.ru> Subject: Re: [Sarlug] Распарсить CSV Date: Mon, 3 Dec 2012 12:56:21 +0400 Message-ID: <49207209.20121203125621@nita-farm.ru> (raw) In-Reply-To: <CANXqFx_hH=VFmsW=WEyt4a_PwKYBoyK8=QtBMPiXiO-JZ9xraA@mail.gmail.com> Здравствуйте, Тарас. Вы писали 3 декабря 2012 г., 12:48:31: ТП> ОК, кто может помощь с sed? ТП> Хочу вычленить из строк вида: ТП> First Last 17.01MB ТП> отдельно First Last и отдельно размер. Причем там могут быть еще ТП> и KB, т.е. это тоже придется учесть. ТП> Но пока завис на написании RegExp под sed. ТП> $ echo 'First Last 17.01MB'|sed -e 's/\([a-zA-Z]+ [a-zA-Z]+\) \([0-9]*\)[KMB]/\1:\2/g' ТП> First Last 17.01MB Может, проще так? $echo "First Last 17.01MB" | awk '{print $1,$2,$3}' -- Origin: А по мне, хоть бревна таскать, лишь бы лежа. -- Sincerely, Dmitry Burmistrov mailto:burmistrov@nita-farm.ru
next prev parent reply other threads:[~2012-12-03 8:56 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-03 8:02 ` Aleksei Sinitsyn 2012-12-03 8:56 ` Дмитрий Бурмистров [this message] 2012-12-03 9:37 ` Aleksei Sinitsyn 2012-12-10 11:22 ` Aleksei Sinitsyn
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=49207209.20121203125621@nita-farm.ru \ --to=demon@nita-farm.ru \ --cc=sarlug@lists.lug.ru \ /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
Saratov Linux User Group This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sarlug/0 sarlug/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 sarlug sarlug/ http://lore.altlinux.org/sarlug \ sarlug@lists.lug.ru sarlug@lug.ru public-inbox-index sarlug Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sarlug AGPL code for this site: git clone https://public-inbox.org/public-inbox.git