Re: shell
>>>>> On Wed, 03 Apr 2002 17:49:43 +0600
>>>>> "Viktor" == Viktor Vislobokov <vvislobokov@lukoilperm.ru> wrote:
Viktor>
>> Может кто знает..
>> Как можно с помощью shell изменить строку в файле???
>> к примеру есть файл
>> ---
>> ---
>> 1
>> ---
>> ---
>> нужно заменить
>> ---
>> ---
>> 2
>> ---
>> ---
>> причем 1 встречается однажды во всем файле...
Viktor>
Viktor> Ну например:
Viktor>
Viktor> cat file.txt | sed -e 's/1/2/' >/tmp/tmp.tmp
Viktor> mv /tmp/tmp.tmp file.txt
sed -e 's/^1$/2/'
--
Alexander Kotelnikov
Saint-Petersburg, Russia
--
To UNSUBSCRIBE, email to debian-russian-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to:
- References:
- shell
- From: "Алексей А. Спицын \(Aleksey A. Spitsin\)" <skopa@spkchel.ru>
- Re: shell
- From: "Viktor Vislobokov" <vvislobokov@lukoilperm.ru>