Do you know why this script does nothing?

Terry Chan tpchan at comcast.net
Fri Oct 13 00:29:59 UTC 2006


sed -i says edit the file in place. So I have no idea what you are trying to
do with the > /tmp/tymczas as part of your sed command, and then the
subsequent mv command won't do much of anything useful either.

Terry Chan
-------------------------------------------------------------------
On Fri, Oct 13, 2006 at 01:45:13AM +0200, Zbigniew Luszpinski wrote:
> for f in "`find . -name DETAILS`"; do
>     sed -i -e 's at ftp://ftp.x.org/pub/X11R7.0/@$XORG_URL/X11R${VERSION}/@g' 
> "$f" > /tmp/tymczas;
>     mv /tmp/tymczas "$f";
>     done
> 
> This script should find all DETAILS files in xorg-7.0 and change url patch. 
> None of files are modified. What' wrong with it?
> 
> I tested for - returns correct files. Then checked sed, replaces strings. 
> Finally checked mv, moves files. Everything works. When all these commands 
> are put together in one script everythng works except that none of files are 
> modified. Arrgh!
> 
> zbiggy


More information about the Lunar mailing list