Re: [Asterisk-Users] How to quickly replace ', ' with '|' in dialplans?

kleis-asterisk-dev at tiscali.it kleis-asterisk-dev at tiscali.it
Sat Jun 4 13:30:04 MST 2005


>-- Messaggio Originale --
>Date: Sat, 4 Jun 2005 14:52:42 -0400 (EDT)
>From: Steve <asterisk at michiganbroadband.com>
>To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
>Subject: Re: [Asterisk-Users] How to quickly replace ',
>	' with '|' in dialplans?
>Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
>
>
>
>I stink at regular expressions, but can always find what I need to get a
>
>job done using google :-)
>
>Don't use vi (unless you figure out how to do it in vi).
>I won't be much help there.
>
>in this case sed is your friend.
>
>It's a breeze to use too.
>
>Here's what it looks like:  sed -e "s/text_to_find/text_to_replace/g" 
>inputfile > outputfile
>and yup you can use the same name for both files to simply update the 
>file.
>
>Make sure you back it up first of course.
>
>Here's a link with some more examples using sed: 
>http://pegasus.rutgers.edu/~elflord/unix/sed.html
>
>
>Hope this helps!
>
>Steve
>


Just had a look at that links, and yes!, sed looks better than vi, thanks!
:)
Unfortunately I don't know regular expressions at all, so it doesn't help
too much now... but I'll play with them.

Thanks,

Alex

__________________________________________________________________
TISCALI ADSL 1.25 MEGA a soli 19.95 euro/mese
Solo con Tiscali Adsl navighi senza limiti di tempo
a meno di 20 euro al mese e in piu' telefoni senza
pagare il canone Telecom. Scopri come
http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/






More information about the asterisk-users mailing list