for i in *.html ; do
sed < $i  \
-e 's/f=\"0/f=\"http:\/\/www.spacewar.com\/afp\/0/g'  \
-e 's/spacedaily/spacewar/g' \
-e 's/spxphp/swxphpm/g'  \
-e 's/000080/226033/g'  \
-e 's/SPACE.WIRE/WAR.WIRE/g' \
-e 's/basket\">WAR./basket\">\&nbsp\;WAR./g' \
-e 's/sid=8288/sid=10749/g'  \
> $i.tmp;
mv $i.tmp $i;
done
cat military-briefs.js| perl -p -e 's/news/afp/g;' > military-briefs-afp1.js
cat military-briefs-afp1.js| perl -p -e 's/spacedaily/spacewar/g;' > military-briefs-afp.js
# cat missiles-briefs.js| perl -p -e 's/news/afp/g;' > missiles-briefs-afp1.js
# cat missiles-briefs-afp1.js| perl -p -e 's/spacedaily/spacewar/g;' > missiles-briefs-afp.js
cat nuclear-briefs.js| perl -p -e 's/news/afp/g;' > nuclear-briefs-afp1.js
cat nuclear-briefs-afp1.js| perl -p -e 's/spacedaily/spacewar/g;' > nuclear-briefs-afp.js
cp military-briefs-afp.js ../../news/afp-headlines.js
cp military-briefs-afp.js ../
# cp missiles-briefs-afp.js ../
cp nuclear-briefs-afp.js ../
# cp 1*.html ../../
mv *.html ../
rm -f *.js
cd ..
# cat military-briefs.html| perl -p -e 's/f=\"0/f=\"http:\/\/www.spacewar.com\/afp\/0/g;' > military-briefs3.php
# cat missiles-briefs.html| perl -p -e 's/f=\"0/f=\"http:\/\/www.spacewar.com\/afp\/0/g;' > missiles-briefs3.php
# cat nuclear-briefs.html| perl -p -e 's/f=\"0/f=\"http:\/\/www.spacewar.com\/afp\/0/g;' > nuclear-briefs3.php
cat military-briefs.html| perl -p -e 's/f=\"2/f=\"http:\/\/www.spacewar.com\/afp\/2/g;' > military-briefs3.php
# cat missiles-briefs.html| perl -p -e 's/f=\"2/f=\"http:\/\/www.spacewar.com\/afp\/2/g;' > missiles-briefs3.php
cat nuclear-briefs.html| perl -p -e 's/f=\"2/f=\"http:\/\/www.spacewar.com\/afp\/2/g;' > nuclear-briefs3.php
cat military-briefs3.php| perl -p -e 's/<li>//g;' > military-briefs2.php
# cat missiles-briefs3.php| perl -p -e 's/<li>//g;' > missiles-briefs2.php
cat nuclear-briefs3.php| perl -p -e 's/<li>//g;' > nuclear-briefs2.php
cat military-briefs2.php| perl -p -e 's/.html\"/.html\" class=\"fullstory\"/g;' > military-briefs1.php
# cat missiles-briefs2.php| perl -p -e 's/.html\"/.html\" class=\"fullstory\"/g;' > missiles-briefs1.php
cat nuclear-briefs2.php| perl -p -e 's/.html\"/.html\" class=\"fullstory\"/g;' > nuclear-briefs1.php
cat military-briefs1.php| perl -p -e 's/<\/a>/<br \/><br \/><\/a>/g;' > military-briefs.php
# cat missiles-briefs1.php| perl -p -e 's/<\/a>/<br \/><br \/><\/a>/g;' > missiles-briefs.php
cat nuclear-briefs1.php| perl -p -e 's/<\/a>/<br \/><br \/><\/a>/g;' > nuclear-briefs.php
