ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Шишков Евгений" <evgen@svi.pp.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] как быть с кодировкой?
Date: Fri, 11 May 2007 12:06:40 +0400
Message-ID: <46442410.5060008@svi.pp.ru> (raw)
In-Reply-To: <200705111159.17285.shrek@altlinux.ru>

Valery V. Inozemtsev пишет:
>>
>> В принципе, "прыгая" с компа на комп с разными кодировками (правда в
>> основном с koi8 на cp1251) написал скриптик (легко меняемый для разных
>> нужд)
>>
>> #!/bin/bash
>> # renames.sh
>> # простая программа переименования
>>
>> # criteria=$1
>> # re_match=$2
>> # replace=$3
>>
>> mkdir $1
>>
>> list='*'
>> for i in $list ;
>>      do
>>          src=$i
>>          tgt=`echo $src |  iconv -c -r -fKOI8-R  -tUTF8`
>> echo "$src" "$tgt"
>> mv "$src" $2/"$tgt"
>>   done
> 
> загнется на первом же файле с пробелом
Да вроде переименовывает
Я немного проще сделал:

#!/bin/bash
# renames.sh
# простая программа переименования
list='*'
for i in $list ;
  do
  src=$i
  tgt=`echo $src |  iconv -c -r -fKOI8R  -tUTF-8`
  mv "$src" "$tgt"
done

Где взят файл, там и переименовали.
Файлы специально с пробелами взял.
Правда ещё не подсовывал их в систему с UTF-8


  reply	other threads:[~2007-05-11  8:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11  7:16 Шишков Евгений
2007-05-11  7:32 ` Epiphanov Sergei
2007-05-11  7:34 ` Хихин Руслан
2007-05-11  7:47   ` Шишков Евгений
2007-05-11  7:59   ` Valery V. Inozemtsev
2007-05-11  8:06     ` Шишков Евгений [this message]
2007-05-11 18:12       ` Хихин Руслан
2007-05-11 20:05           ` Евгений
2007-05-11  8:36   ` Epiphanov Sergei
2007-05-11 13:56 ` Евгений Терешков
2007-05-14 17:30 ` Maxim Tyurin

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=46442410.5060008@svi.pp.ru \
    --to=evgen@svi.pp.ru \
    --cc=sisyphus@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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git