I am trying to execute a script with sed that works well in ksh(Linux) however in bash(solaris 8) though it does not give any errors the output file becomes 0 byte.
header of the script:
ksh:2$ head news.ksh
#!/bin/ksh
#------------------------------------------------------------------------------------------------------------
# Shell : KSH
CODE :
echo TWO
ls -lt /$HOME/*.html
sed "s/Count/$COUNT/g" ${CONFIG_PATH}/news.html > ${CONFIG_PATH}/temp_query.html | mv ${CONFIG_PATH}/temp_query.html ${CONFIG_PATH}/news.html
echo THREE
ls -lt /app.1.0.2/*.html
rc2=$?
executed in bash shell using command:
sh -x new.ksh parameter1
Execution:
+ echo TWO
TWO
+ ls -lt /app.1.0.2/news.html
-rw-r--r-- 1 abc abc 1799 Jul 23 10:25 /app.1.0.2/news.html
+ mv /app.1.0.2/temp_query.html /app.1.0.2/news.html
+ sed s/Count/ 0/g /app.1.0.2/news.html
+ echo THREE
THREE
+ ls -lt /app.1.0.2/news.html
-rw-r--r-- 1 abc abc 0 Jul 23 10:25 /app.1.0.2/news.html
rc2=0
Looking at the execution all the variables are substituted ... I am not able to understand what is happening

.. need help