Skip to content

Instantly share code, notes, and snippets.

@ryumei
Created August 10, 2018 03:20
Show Gist options
  • Save ryumei/0d35af7b30d199111c58e8732edc3157 to your computer and use it in GitHub Desktop.
Save ryumei/0d35af7b30d199111c58e8732edc3157 to your computer and use it in GitHub Desktop.
Get an oneline quote with timestamp
#!/bin/sh
API_URL="https://talaikis.com/api/quotes/random/"
curl -XGET "$API_URL" | sed -e "s/{/{\"timestamp\":`date '+%s'`,/"
@ryumei
Copy link
Author

ryumei commented Aug 10, 2018

Example Output is

{"timestamp":1533871151,"quote":"Whether it's a 16-year old girl, or a mom, or a guy, or anybody, as long as they come up and they're excited to meet me 'cause they've had some sort of relationship with something I've created, it's the coolest thing ever. It never gets old. It's awesome.","author":"Andy Grammer","cat":"mom"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment