0

I apply simple script to change word in some files with another word.

for x in $(find .|grep Makefile) ;
do 
sed -i -e 's/certainWord/anotherword/g' $x ;
done 

the changes occur in the file when I check it manually but when I try to commit svn files it doesn't sense that anyone has changed !

is it a known problem ?

I'm using smart svn tool to commit

4

1 回答 1

1

我发现了问题。上面的脚本遍历 .svn 目录并更改其中的文件以及工作副本中的文件。这就是为什么它没有感觉到变化。似乎它将工作副本与 .svn {I'm new to svn :*} 下的副本进行了比较

我的解决方案是忽略隐藏文件夹以忽略 .svn 目录

for x in $(find . -not -path '*/\.*'|grep Makefile) ;
do 
sed -i -e 's/certainWord/anotherword/g' $x ;
done
于 2016-01-26T16:44:13.350 回答