From: cornet <cornet@zmail.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] Re: [mdk-re] Такая прога -а как кусается!
Date: Sun Sep 16 22:47:00 2001
Message-ID: <3BA4F3CD.12AA6D39@zmail.ru> (raw)
In-Reply-To: <200109161846.f8GIk1e09830@pif.b5.mephi.ru>
Sergei wrote:
>
> 16 Сентябрь 2001 22:38, Вы написали:
>
> > Да, тут все верно.
> > К сожалению, но могу проверить работу Вашего скрипта, но скажите, она
> > хоть как-то отрабатывает на каком-нибудь каталоге или уходит в себя?
>
> Она в текущем каталоге создает файл results.txt, куда и заносит нашедшее.
> Прога работает, но в процессе работы по мере выдачи инфы в results.txt память
> медленно, но верно уходит.
>
> > Так сходу некорректная конструкция:
> > ----
> > while ($file=<FILES>), однако в таком виде наоборот, Ваш цикл на
> > вызовется ни разу.
> > Вам надо (не меняя Ваши переменные)
> >
> > while (<FILES>) {
> > chomp;
> > $file = $_;
> > дальше по тексту.
> > ----
>
> Попробую.
>
> > Что Вы хотите от этой конструкции?
> > if ($file =~ /^\/.*:$/) {...}
>
> Это отработка информации от ls: при вызове с параметрами -1aR она проходит
> каждый подкаталог, при этом каждый новый каталог начинается с "/", а
> заканчивается на ":". То есть отслеживаю вложения каталогов.
А не прощели использовать find вместо ls ??
Вы получите пути файлов от текущего каталога или корня (смотря
как вызвать) и к тому же вывод не будет забит именами каталогов,
будут только файлы. ИМХО, удобнее дал строку
@files=`find -type f $dir`;
и имеем в @files _все_ файлы под каталогом $dir, по одному файлу
в каждом элементе, причем там заведомо будут _только_ файлы и с
путями!
И ничего регэкспами гонять не надо, каталоги отслеживать :-)
--
******** FIRE & STEEL ********
next prev parent reply other threads:[~2001-09-16 22:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-16 20:53 [mdk-re] Такая прога - а " Sergei
2001-09-16 21:32 ` cornet
2001-09-16 21:42 ` [mdk-re] Такая прога -а " Sergei
2001-09-16 22:29 ` [mdk-re] " Sergey Degtyaryov
2001-09-16 22:36 ` Sergei
2001-09-16 22:47 ` cornet [this message]
2001-09-16 23:17 ` Sergei
2001-09-16 22:44 ` Sergei
2001-09-16 22:55 ` [mdk-re] " Sergey Degtyaryov
2001-09-16 22:43 ` Sergei
2001-09-16 22:52 ` cornet
2001-09-16 23:13 ` cornet
2001-09-16 23:20 ` Sergey Degtyaryov
2001-09-16 23:29 ` cornet
2001-09-17 11:05 ` [mdk-re] ôÁËÁÑ ÐÒÏÇÁ -Á ËÁË ËÕÓÁÅÔÓÑ! Serge Skorokhodov
2001-09-17 11:18 ` [mdk-re] [JT]Такая прога -а как кусается!=>public vehicle readable documentation cornet
2001-09-17 15:05 ` [mdk-re] Re: [mdk-re] ôÁËÁÑ ÐÒÏÇÁ -Á ËÁË ËÕÓÁÅÔÓÑ! Serge Skorokhodov
2001-09-17 3:11 ` [mdk-re] Такая прога - а как кусается! Sergei
2001-09-17 9:55 ` cornet
2001-09-17 13:06 ` [mdk-re] " Sergey Degtyaryov
2001-09-17 13:27 ` Artem K. Jouravsky
2001-09-17 22:01 ` [mdk-re] Такая прога -а " Sergei
2001-09-17 19:32 ` [mdk-re] Такая прога - а " Sergey Vlasov
2001-09-17 22:00 ` [mdk-re] Такая прога -а " Sergei
2001-09-18 18:42 ` Sergey Vlasov
2001-09-17 22:25 ` Sergei
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=3BA4F3CD.12AA6D39@zmail.ru \
--to=cornet@zmail.ru \
--cc=mandrake-russian@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