I have a file "test.htm" with the follwoing content
<html>
<head></head>
<body>site-is-down</body>
</html>
I am trying to make it "site-is-up" if it has text "site-is-down". When I execute the script its showing correct output ,but its not replacing anything in the file
#!/bin/ksh
if grep "site-is-down" test.htm; then
sed -e "s/down/up/g" test.htm
else
echo "Site is already up"
fi