Created
May 3, 2016 17:45
-
-
Save CameronBanga/bfb957606c2b3fbc3da332277739c9ee to your computer and use it in GitHub Desktop.
A quick and bad bash script to help Harry log an API.
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 | |
## date format to log the time of the pull## | |
NOW=$(date +"%Y-%m-%d %H:%M:%S") | |
## change this to wherever you want your log stored | |
echo ""API pull at "$NOW" >> ~/Documents/API.txt | |
## update your curl here, obviously use same file | |
curl -X "GET" "http://www.google.com" >> ~/Documents/API.txt | |
## this is a lame way to create line breaks. having issue with echo and zsh, so used printf like a newb | |
printf '\n\n' >> ~/Documents/API.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment