data=$(wget -qO - https://blockchain.info/fr/q/addressbalance/$pk)
if [$data != 0]; then
echo "Hello"
else
echo "good bye"
fi
I have tried a lot of possibilities. I don't know how to work this.
I don't understand why this condition doesn't work.
wget -qO - https://blockchain.info/fr/q/addressbalance/$pk
if [$? != 0]; then
echo "Hello"
else
echo "good bye"
fi
Result:
192005332305./btc.sh: ligne 6: [0 : commande introuvable good bye