>-- Messaggio Originale -- >Date: Sat, 4 Jun 2005 14:52:42 -0400 (EDT) >From: Steve <[EMAIL PROTECTED]> >To: Asterisk Users Mailing List - Non-Commercial Discussion ><[email protected]> >Subject: Re: [Asterisk-Users] How to quickly replace ', > ' with '|' in dialplans? >Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion ><[email protected]> > > > >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/ _______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
