* [Comm] mass text changes
@ 2004-03-17 12:28 Andriy Dobrovol's'kii
2004-03-18 11:24 ` Dmitry Alexeyev
2004-03-18 11:29 ` [Comm] " Anton V. Boyarshinov
0 siblings, 2 replies; 4+ messages in thread
From: Andriy Dobrovol's'kii @ 2004-03-17 12:28 UTC (permalink / raw)
To: Community
Hi,
Возникла потребность произвести массовую замену в большом количестве
файлов раскиданых по каталогам.
Ну список файлов для замены я получу, а чем потом выполнить замену
по списку?
awk, sed? Или что-то ещё?
--
Rgrds,
Andriy
*********************************************************************
email: dobr at iop dot kiev dot ua Kyiv, Ukraine
Phone: (380-44) 265-7824 Department of Gas Electronics
Fax: (380-44) 265-2329 Institute of Physics of NASU
*********************************************************************
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] mass text changes
2004-03-17 12:28 [Comm] mass text changes Andriy Dobrovol's'kii
@ 2004-03-18 11:24 ` Dmitry Alexeyev
2004-03-18 11:29 ` [Comm] " Anton V. Boyarshinov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Alexeyev @ 2004-03-18 11:24 UTC (permalink / raw)
To: community
Это несколько overkill, но я делаю так:
find . -type f | xargs grep -l "string1" | xargs perl -pi -e
"s|string1|string2|g;"
WBR,
Dmitry
> Hi,
> Возникла потребность произвести массовую замену в большом количестве
> файлов раскиданых по каталогам.
> Ну список файлов для замены я получу, а чем потом выполнить замену
> по списку?
> awk, sed? Или что-то ещё?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Comm] Re: mass text changes
2004-03-17 12:28 [Comm] mass text changes Andriy Dobrovol's'kii
2004-03-18 11:24 ` Dmitry Alexeyev
@ 2004-03-18 11:29 ` Anton V. Boyarshinov
2004-03-19 10:31 ` Andriy Dobrovol's'kii
1 sibling, 1 reply; 4+ messages in thread
From: Anton V. Boyarshinov @ 2004-03-18 11:29 UTC (permalink / raw)
To: community
On Wed, 17 Mar 2004 14:28:15 +0200 Andriy Dobrovol's'kii
wrote:
> Hi,
> Возникла потребность произвести массовую замену в большом
> количестве файлов раскиданых по каталогам.
> Ну список файлов для замены я получу, а чем потом выполнить
> замену по списку?
> awk, sed? Или что-то ещё?
subst ?
--
mailto:boyarsh@mail.ru
mailto:boyarsh@ru.echo.fr
14:28:00 up 13 days, 4:31, 9 users, load average: 0.09,
0.08, 0.02
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] Re: mass text changes
2004-03-18 11:29 ` [Comm] " Anton V. Boyarshinov
@ 2004-03-19 10:31 ` Andriy Dobrovol's'kii
0 siblings, 0 replies; 4+ messages in thread
From: Andriy Dobrovol's'kii @ 2004-03-19 10:31 UTC (permalink / raw)
To: community
Anton V. Boyarshinov wrote:
> On Wed, 17 Mar 2004 14:28:15 +0200 Andriy Dobrovol's'kii
> wrote:
>
>
>>Hi,
>>Возникла потребность произвести массовую замену в большом
>>количестве файлов раскиданых по каталогам.
>>Ну список файлов для замены я получу, а чем потом выполнить
>>замену по списку?
>>awk, sed? Или что-то ещё?
>
>
> subst ?
>
Не. По требованиям задачи subst не подошел. Хотя письма пришли уже
после решения проблемы, снова была какая-то задержка с доставкой
рассылки, спасибо за отклики. Моё решение ближе к варианту Дмитрия.
Только писк grep-ом по содержимому файлов и замена sed-ом в найденых
файлах. Через скрипт, чтоб не сломать пальцы в командной строке. ;)
--
Rgrds,
Andriy
*********************************************************************
email: dobr at iop dot kiev dot ua Kyiv, Ukraine
Phone: (380-44) 265-7824 Department of Gas Electronics
Fax: (380-44) 265-2329 Institute of Physics of NASU
*********************************************************************
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-19 10:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17 12:28 [Comm] mass text changes Andriy Dobrovol's'kii
2004-03-18 11:24 ` Dmitry Alexeyev
2004-03-18 11:29 ` [Comm] " Anton V. Boyarshinov
2004-03-19 10:31 ` Andriy Dobrovol's'kii
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