ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: php-coder <php-coder@ngs.ru>
To: community@altlinux.ru
Subject: Re: [Comm] список url-адресов из html файла
Date: Fri, 15 Apr 2005 18:38:57 +0700
Message-ID: <20050415113857.GA1944@mycomp.mydomain> (raw)
In-Reply-To: <200504142300.30609.birukov@vladinfo.ru>


--- Aleksey E. Birukov 2005-04-14 23:00:30 +0400
+++ php-coder 2005-04-15 18:34:51 +0700

> Если дороботать sed/awk/cut можно добится нужного мне результата.
> Может еще есть варианты?

    Что тут писАть-то?? Какие еще варианты? Задача на пять минут! :))

    [c0der@mycomp ~]$ cat get_links.sh
    #!/bin/sh

    COUNT_LINKS=`lynx -dump "$1" | tail -1 | tr -s " " | cut -d' ' -f2 | rev
    | cut -c 2- | rev`
    echo "Всего ссылок на странице:" $COUNT_LINKS

    lynx -dump $1 | tail -`echo $COUNT_LINKS` | tr -s " " | cut -d' ' -f3
    | grep -e '^[^(javascript|mailto|file)]' > "$1".links.txt
    
    Вот и весь ваш скрипт! Работает так:

    [c0der@mycomp ~]$ ./get_links.sh IRC.html
    18:35
    Всего ссылок на странице: 68
    [c0der@mycomp ~]$ head IRC.html.links.txt
    18:36
    http://linuxforum.ru/rss.php
    http://www.linuxforum.ru/index.php?s=5263672fd4c15df620aac81e78f28057&
    http://www.linuxforum.ru/index.php?act=Search&f=26
    http://unix.ginras.ru/sitemap.html
    http://rus-linux.net/
    http://www.linuxforum.ru/index.php?s=5263672fd4c15df620aac81e78f28057&act=boardrules
    http://www.linuxforum.ru/index.php?s=5263672fd4c15df620aac81e78f28057&act=Login&CODE=00
    http://www.linuxforum.ru/index.php?s=5263672fd4c15df620aac81e78f28057&act=Reg&CODE=00
    http://www.linuxforum.ru/index.php?s=5263672fd4c15df620aac81e78f28057&act=idx
    http://www.linuxforum.ru/index.php?s=5263672fd4c15df620aac81e78f28057&showforum=40
    [c0der@mycomp ~]$ 
   
    ОНО? ;-)

-- 
+ php-coder
+ php-coder[at]ngs[dot]ru
+ ALTLinux Master 2.4 (kernel 2.4.26-std-up-alt11)



  parent reply	other threads:[~2005-04-15 11:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14 15:08 Aleksey E. Birukov
2005-04-14 18:48 ` php-coder
2005-04-14 19:00   ` Aleksey E. Birukov
2005-04-15  5:02     ` [Comm] УРЙУПЛ url-БДТЕУПЧ ЙЪ html ЖБКМБ Alexey V. Novikov
2005-04-15 11:38     ` php-coder [this message]
2005-04-15 14:07     ` [Comm] список url-адресов из html файла Dmytro O. Redchuk

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=20050415113857.GA1944@mycomp.mydomain \
    --to=php-coder@ngs.ru \
    --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