Search Results

Search: Posts Made By: waince
1,655
Posted By waince
If statement to compare two strings
Hi,

I am trying to do the following to see if "ip" is already present in a file.

if ["$ip" == "(cat /etc/hosts.deny | grep {$ip})"]; then
echo "hi"
else
echo "hello"
fi
I am seeing...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 03:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy