A practical walkthrough of using curl and awk to check whether PagerDuty has updated their vCard (contact file containing all their notification phone numbers). The author creates a shell alias that fetches PagerDuty's support page, parses the HTML with awk's match function and a regex to extract the last-updated date, and runs it weekly to know when to re-download the vCard. The post explains the awk regex in detail and also outlines a more robust automated approach using checksums, a cron job, and Slack/email notifications.
1.3K Impressions