Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: Little help about sed editor


  • Subject: Re: lug-bg: Little help about sed editor
  • From: yuliy@xxxxxxxxxxxx (Yuliy Minchev)
  • Date: Mon, 5 Jun 2000 15:01:27 +0200 (BST)



On Mon, 5 Jun 2000, Nikolay Kabaivanov wrote:

> Zdrawejte 
> Imam problem s towa da nakaram redaktora sed da mi podmeni string ot
> wida   "www.company.com/directory" sus stringa "site.company.com"
> problemi suzdawa naklonenata cherta "/"  probwah i niakolko warianata s
> kawicki no nesto ne stana :-(
> Niakoj ima li ideia kak da se kaze na sed che towa e edin cial string ?
> Po princip mezdu chertite triabwa da e "regexp".
> eto kak probwam az :
> -----------------------
> /bin/sed s/www.company.com/support/support.company.com/ some_file
> >another_file
> -----------------------
prosto e - da si chuval za backslash?

ed -e's/www\/support/blahblah/g' < infile > outfile
mv outfile infile

> Ima il niakakuw nachin da se izbegne prenasochwaneto kum drug fajl, t.e.
> promenite da stawat naprawo w osnownia fajla. 
> Blagodaria predwaritelno.
moje, ako izpolzvash vi primerno
vi infile

i sled tova
:%s/www\/support/blahblah/g
:wq

ili si napishe script da kajem na perl ili awk+shell

yuliy


--
  Yuliy Minchev, 
  Systems Administrator
  NOAC Bulgaria

==================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
Otpiswaneto RABOTI !!! : Majordomo@xxxxxxxxxxxxxxxxxx UNSUBSCRIBE LUG-BG
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora




 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.