ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Antonio <obidos@mail.ru>
To: community@altlinux.ru
Subject: Re: [Comm] [JT] скрипт...
Date: Tue, 14 Oct 2003 08:46:37 -0000
Message-ID: <Pine.LNX.4.44.0310141252430.714-200000@tony.localnet> (raw)
In-Reply-To: <20031014082855.GU3095@inferno.immo>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 885 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 14 Oct 2003, Alexey I. Froloff wrote:

> > > > к выводу по "tree -f -i"необходимо добавлять некую символьную строку,
> > > > которая будет аргументом к скрипту...
> > > > я так понимаю, что надо в bash повторить функциональность tree, но как
> > > > это сделать...
> > > echo ?
> > нет... вся сложность с обходом дерева каталогов... задача
> > классическая, как я понимаю, но у меня нет времени для
> > разборов...

Предлагается для доработки скриптец (в аттаче). Изначально
писАлся для тупой проверки CD-R(W) на читаемость файловой
системы.

> man find
> man xargs

Но лучше именно так.

- -- 
Best regards,
	Tony.			mailto:obidos@mail.ru
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE/i7oH2gaLrWRbr5URAijuAJ0VmI2V7ayn+Z4DoMbAGSg6YqtDDwCghNIq
xHBDbhWw6tKQtBUOKKM3SLQ=
=u4F4
-----END PGP SIGNATURE-----


[-- Attachment #2: Type: TEXT/PLAIN, Size: 546 bytes --]

#!/bin/sh
f()
{
for i in `ls -l | awk '{print $9}'` 
do 
    if [ -d $i ]; then 
	echo Changing directory to $i...
	if [ -x $i ]; then
	    cd $i
	    f
	    cd ..
	else
	    echo Cannot change directory. Possible check permissions.
	fi    
    else
	echo Reading $i, `ls -l $i | awk '{print $5}'` bytes...
	cp $i /dev/null
    fi
done
return
}
echo -
echo + Recursive read test
echo + Written Jun 26 2001 by obidos@mail.ru 
echo -
if [ $[$#] -eq 0 ]; then
    w=`pwd`
else
    w=$1
fi    
s=`pwd`
cd $w
f
cd $s

      reply	other threads:[~2003-10-14  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-14  7:12 Alex
2003-10-14  8:17 ` shawkat
2003-10-14  8:25   ` Alex
2003-10-14  8:29     ` Alexey I. Froloff
2003-10-14  8:46       ` Antonio [this message]

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=Pine.LNX.4.44.0310141252430.714-200000@tony.localnet \
    --to=obidos@mail.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