From: Sergey Vlasov <vsu@mivlgu.murom.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] Регистр имени файла
Date: Thu Feb 21 17:32:01 2002
Message-ID: <20020221173829.C3507@vcserver.mivlgu.ru> (raw)
In-Reply-To: <20020221171717.3bf78241.peet@infosite.ru>
On Thu, Feb 21, 2002 at 17:17:17 +0300, Peter V. Saveliev wrote:
> On Thu, 21 Feb 2002 16:25:34 +0300
> "Leonid B. Sysoletin" <webmaster@unicon-ms.ru> wrote:
>
> > Добрый день!
> >
> > С глубоким уважением относясь к гУрам perl'а и командной строки, хотелось бы
> > поинтересоваться ;)
> >
> > Можно ли переименовать все файлы текущей директории в lowercase, и, если
> > можно, то как это сделать?
> >
>
> for i in *; do export NEWNAME=`echo $i | tr '[:upper:]' '[:lower:]'`; [ $i = $NEWNAME ] || mv $i $NEWNAME; done
export тут совершенно не нужен, а вот кавычек маловато:
for i in *; do NEWNAME="$(echo "$i" | tr '[:upper:]' '[:lower:]')"; [ "$i" = "$NEWNAME" ] || mv "$i" "$NEWNAME"; done
Иначе будут проблемы, если в имени окажется пробел.
next prev parent reply other threads:[~2002-02-21 17:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-21 16:15 Leonid B. Sysoletin
2002-02-21 17:10 ` Peter V. Saveliev
2002-02-21 17:15 ` Leonid B. Sysoletin
2002-02-21 17:32 ` Sergey Vlasov [this message]
2002-02-21 17:41 ` Peter V. Saveliev
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=20020221173829.C3507@vcserver.mivlgu.ru \
--to=vsu@mivlgu.murom.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