Last active
April 3, 2022 14:21
-
-
Save saintmalik/ae14a20e6475025b7ba5ba7df4cda46a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
bash data.sh | jq . > data.txt | |
result=$(cat data.txt | grep -e "successful" | wc -l) | |
if [ $result -eq 3 ]; then | |
echo "Success, Everyone got the topup π" | |
else | |
echo "Ahhh, we've got errors oooh ππ€£π" | |
fi | |
##You create a file named data.sh and declare users phone number as variable and add the data/airtime provider api, the `result == "3"` is because i have 3 curl url running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment