From: "Alexandr A. Alexandrov" <aaa@inrecolan.com>
To: ALT Linux Community <community@lists.altlinux.org>
Subject: Re[3]: [Comm] Переконвертация имён файлов на ext3
Date: Sat, 25 Feb 2006 17:15:58 +0300
Message-ID: <33642895.20060225171558@inrecolan.com> (raw)
In-Reply-To: <1134521553.20060225011050@inrecolan.com>
Доброго времени суток!
Saturday, February 25, 2006, 1:10:50 AM, вы писали:
>>> Что-то не очень понятно, что сделать нужно, но, по-видимому, что-то вроде
>>>
>>> for f in * ; do mv $f `echo $f | iconv -f KOI-8 -t UTF-8` ; done
>>>
AF>> Только все имена лучше брать в кавычки ("$f").
AAA> Пытался сделать всё вообще одной командой - чтобы и рекурсивно по всем
AAA> каталогам пройтись. Но почему-то не удалось победить вариант, когда в
AAA> именах каталогов пробелы. Делал так:
AAA> for f in `find * -print0 | xargs -0` ; do install -D "$f"
AAA> ~/tmp/"`echo "$f" | iconv -f CP1251 -t UTF8`" ; done
Видимо, не хватает знаний по шеллу.. :-( Вот что делаю, создав
тестовый каталог и тестовый файл:
[aaa@aaa test]$ find * -print | sed -e 's/.*/"&"/g'
"каталог с пробелами"
"каталог с пробелами/файл с пробелами.ф"
[aaa@aaa test]$ for f in `find * -print | sed -e 's/.*/"&"/g'`; do echo "$f" ; done
"каталог
с
пробелами"
"каталог
с
пробелами/файл
с
пробелами.ф"
То есть в шелле пробелы получаются неэкранированными. Пробовал с
помощью сед-а заменить пробелы на "\ " - но не помогло... Как
правильно?
--
С уважением,
Александр
Девиз дня: Не так страшен Карлсон, как его пропеллер...
next prev parent reply other threads:[~2006-02-25 14:15 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 ` Alexandr A. Alexandrov [this message]
2006-02-26 12:39 ` ABATAPA
2006-02-26 19:11 ` Re[4]: " Alexandr A. Alexandrov
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=33642895.20060225171558@inrecolan.com \
--to=aaa@inrecolan.com \
--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