Skip to content

Instantly share code, notes, and snippets.

@raj-saxena
Last active May 18, 2022 14:57
Show Gist options
  • Save raj-saxena/943a9f18635eeb54d261d4abb7a5094e to your computer and use it in GitHub Desktop.
Save raj-saxena/943a9f18635eeb54d261d4abb7a5094e to your computer and use it in GitHub Desktop.
To test the logging & reporting of running a script
#!/bin/bash
set -o errexit -o nounset -o pipefail -o xtrace
echo "Hello World"
curl -I "https://app.n26.com/login"
# install software
sudo apt update
sudo apt install -y iputils-ping netcat
ping -c 3 "www.indiatoday.in"
file_ts=$(date +"%m-%d-%Y_%H-%M-%S")
echo $file_ts > timestamp_$file_ts.txt
curl --data-binary @timestamp_$file_ts.txt \
-H "Content-Type: text/plain" \
-H "Authorization: Bearer $API_UPLOAD_SECRET" \
-X POST "https://api.upload.io/v1/files/basic"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment