Last active
May 18, 2022 14:57
-
-
Save raj-saxena/943a9f18635eeb54d261d4abb7a5094e to your computer and use it in GitHub Desktop.
To test the logging & reporting of running a script
This file contains hidden or 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 | |
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