sed modify problem in script

I am having problems with the following "sed" command only when it is issued within a bash script.

#!/bin/bash
cat config.xml | sed -e 's/yes/no/g' > newconfig.xml

When I enter this command from the command line it works like a charm, but when run in a script as shown it "zero's out" my output file.

-rw-r--r-- 1 root root 0 Nov 22 18:48 newconfig.xml

I cannot reproduce your problem. It works fine for me both in a bash script and from the command line.

Please test it with

 sed -n  " ......

On my Unix AIX it is ok with -n