[Asterisk-Users] How to quickly replace ',
' with '|' in dialplans?
Steve
asterisk at michiganbroadband.com
Sat Jun 4 11:52:42 MST 2005
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
----------------
On Sat, 4 Jun 2005 kleis-asterisk-dev at tiscali.it wrote:
> Finally I decided to rewrite my dialplans according to the right sintax,
> that is
>
> exten => someexten,priority,application(arg1,arg2,...)
>
> should be
>
> exten => someexten,priority,application,arg1|arg2...
>
>
> Isn't there anybody skilled enough in regular expressions that could write
> a quick Search 'n' Replace vi command, please?
>
> TIA,
>
> 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/
>
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list