Web aplikacije, web servisi i software Frameworks, web servisi, programi, plugin-ovi, ekstenzije korisni za razvoj web sajtova. Sponzor:
![]() |
|
Alati teme | Način prikaza |
![]() |
#8 |
Banned
Knowledge base
Datum učlanjenja: 01.07.2005
Poruke: 1.598
Hvala: 206
140 "Hvala" u 89 poruka
![]() ![]() |
![]() zaboravih... inace ako imas mogucnost savetovao bih ti da to radis iz shell-a... zato sto ce dosta brze sve biti zavrseno
vec dosta dugo koristim ovaj mali skript za tu svrhu: Kôd:
#!/bin/bash # This script will search and replace all regular files for a string # supplied by the user and replace it with another string. # # Written by Daniel McCarthy # daniel.mccarthy@linuxphile.org # function usage { echo "" echo "Search/replace script" echo " Written by Daniel McCarthy" echo " daniel.mccarthy@linuxphile.org" echo " http://linuxphile.org" echo "" echo "Not enough parameters provided." echo "Usage: ./$0 searchstring replacestring" echo "Remember to escape any special characters in the searchstring or the replacestring" echo "" } #check for required parameters if [ ${#1} -gt 0 ] && [ ${#2} -gt 0 ]; then for f in `find -type f`; do if grep -q $1 $f; then cp $f $f.bak echo "The string $1 will be replaced with $2 in $f" sed s/$1/$2/g < $f.bak > $f rm $f.bak fi done else #print usage informamtion usage fi |
![]() |
![]() |
|
|
![]() |
||||
Tema | Početna poruka teme | Forum | Odgovori | Poslednja poruka |
Najbolji Search & Replace Editor | mungos | Programiranje | 33 | 29. 08. 2010. 18:55 |
PHP Manual tag, Google search tag, Yahoo search tag i jos neki :) | bluesman | Obaveštenja, predlozi i pitanja | 24 | 25. 02. 2006. 10:08 |