Hi,
Iam using the below script for searching and deleting a pattern from a file:
#!/bin/ksh
if [grep $value redirects.virgin-atlantic.com.conf > dred1 && $? == 0] ; then
echo "Pattern exist in redirects.virgin-atlantic.com.conf"
sleep 1000
sed '/"$value"/d' redirects.virgin-atlantic.com.conf > /opt/ADOC/users/agdadmin/test/shazin/olist
cp olist redirects.virgin-atlantic.com.conf
echo "Pattern deleted"
else
echo "Pattern does not exist in redirects.virgin-atlantic.com.conf"
fi
but while executing I am getting the below error:
./redirects.sh[17]: [grep: not found
Please can anyone assist.
Regards,
Shazin