I am pinging a series of web URLs using
if [ (ping6 -c 5 $site) = "unknown host" ]; then
echo "$site does not have an IPv6 Address"
-irrelevant code in context of question-
(ping6 -c 5 $site) = "unknown host"
Write the condition like this:
if [ "$(ping6 -c 5 $site 2>&1)" = "unknown host" ]; then
(...), which is a syntax error here
stdout, so that it gets captured
$(...), so that its result is a single string, otherwise it will be split by spaces, and
[ ... ]will fail with the error:
too many arguments