From: "Alexandr A. Alexandrov" <aaa@inrecolan.com>
To: ABATAPA <altlinux-community@yandex.ru>
Cc: ALT Linux Community <community@lists.altlinux.org>
Subject: Re[4]: [Comm] Переконвертация имён файлов на ext3
Date: Sun, 26 Feb 2006 22:11:55 +0300
Message-ID: <632643889.20060226221155@inrecolan.com> (raw)
In-Reply-To: <200602261539.24886.altlinux-community@yandex.ru>
Доброго времени суток!
Sunday, February 26, 2006, 3:39:24 PM, вы писали:
>> Пытался сделать всё вообще одной командой - чтобы и рекурсивно по всем
>> каталогам пройтись. Но почему-то не удалось победить вариант, когда в
>> именах каталогов пробелы. Делал так:
>>
>> for f in `find * -print0 | xargs -0` ; do install -D "$f" ~/tmp/"`echo "$f"
>> | iconv -f CP1251 -t UTF8`" ; done
A> Тезка, не нужно делать ТАК!
Об этом я догадываюсь. :-) Но меня интересует - КАК надо! :-)
Пока я пришёл к варианту
find dir/* -exec ./proc {} \;
А в proc -
#!/bin/sh
A=`echo $1 | sed -e 's/\ /\\\ /g'`
echo $A | xargs -i% mv % `echo % | iconv -f CP1251 -t UTF8`
Но в этом варианте почему-то подстановка не работает. Причём не
понимаю, почему. Я пробовал `echo % | sed -e 's/x/X/g'` на тестовых
файлах - чтобы не грешить на перекодировки всякие - типа, заменить в
именах файлов маленькие х на большие просто. Так mv сообщает, что
файлы идентичны и он ничего делать не будет. :-(
--
С уважением,
Александр mailto:aaa@inrecolan.com
Девиз дня: Не надо путать причину и следствие. Особенно не надо путать следствие.
next prev parent reply other threads:[~2006-02-26 19:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-24 19:00 Alexandr A. Alexandrov
2006-02-24 19:33 ` Denis Kirienko
2006-02-24 19:40 ` Aleksey Fedoseev
2006-02-24 20:58 ` Re[2]: " Alexandr A. Alexandrov
2006-02-24 22:10 ` Alexandr A. Alexandrov
2006-02-25 14:15 ` Re[3]: " Alexandr A. Alexandrov
2006-02-26 12:39 ` Re[2]: " ABATAPA
2006-02-26 19:11 ` Alexandr A. Alexandrov [this message]
2006-02-24 19:35 ` Alexandr A. Alexandrov
2006-02-25 9:45 ` Sergey Lizogub
2006-02-26 12:32 ` ABATAPA
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=632643889.20060226221155@inrecolan.com \
--to=aaa@inrecolan.com \
--cc=altlinux-community@yandex.ru \
--cc=community@lists.altlinux.org \
/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