[Gambas-user] Global search & replace

Olivier Cruilles linuxos at ...1896...
Sun Apr 10 14:17:20 CEST 2011


Hi,

You can use 'sed' unix command

sed -i 's/<what you search>/<what you want to replace it/g'   <name of the file>

in Gambas

SHELL "sed -i 's/text_to_search/text_to_replace/g' file_example.txt" WAIT

The -i option replace directly all instances founded in the file
and the /g at the end indicate that you want to replace all instances and not only the first one founded.


Olivier Cruilles
Mail: linuxos at ...1896...

Le 10 avr. 2011 à 13:44, richard terry a écrit :

> 
> I'm missing something here, as I can see no way to do a global search and 
> replace of a string across all files in the project.
> 
> Maybe someone can help??
> 
> Regards
> 
> Richard
> 
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 






More information about the User mailing list