From: Dolgov OV <dov@media-link.info> To: community@altlinux.ru Subject: [Comm] sed -? Date: Tue, 5 Oct 2004 16:43:09 +0300 Message-ID: <20041005164309.1f3826e6.dov@media-link.info> (raw) Здравствуйте. Подскажите плз. как sed'ом заменить некий patern переводом строки? Или может не sed'ом, а perl'ом, но задача вот в чем: Есть текстовый файл с фрагментами html кода. В каждой строке от 1-го до 30-ти участков, разделенных последовательностью </TD></tr> Вот эти </TD></tr> я и хочу заменить переводом строки, дабы уже потом обрабатывать каждую отдельную ячейку, как отдельную строку в файле. Пробовал cat list.txt | sed s/"<\/TD><\/tr>"/\n/g - > list1.txt тупо подставляется n. perl -nwe 'print "$1\n" if /(.*)<\/TD><\/tr>/' list.txt > list1.txt отбрасывает только последнюю последовательность. Может можно както perl'у объяснить чтобы он шел последовательно по строке до искомого patern'а? -- С наилучшими, Олег Долгов <dov AT media-link DOT info> Registered Linux user #315454
next reply other threads:[~2004-10-05 13:43 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-10-05 13:43 Dolgov OV [this message] 2004-10-05 13:07 ` Aleksander N. Gorohovski 2004-10-05 14:27 ` Dolgov OV 2004-10-05 15:18 ` Michael Holzman 2004-10-06 8:14 ` Denis A. Yurashkou 2004-10-06 14:19 ` Aleksander N. Gorohovski 2004-10-05 15:19 ` Dolgov OV 2004-10-05 18:39 ` Yura Kalinichenko 2004-10-06 6:58 ` Dolgov OV 2004-10-06 7:36 ` Yura Kalinichenko 2004-10-06 8:15 ` Dolgov OV
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=20041005164309.1f3826e6.dov@media-link.info \ --to=dov@media-link.info \ --cc=community@altlinux.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
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git