Skip to content

Instantly share code, notes, and snippets.

@airbr
Created January 18, 2020 22:33
Show Gist options
  • Save airbr/d87b89e11d9263cfa4b7dc6e1ce6ae92 to your computer and use it in GitHub Desktop.
Save airbr/d87b89e11d9263cfa4b7dc6e1ce6ae92 to your computer and use it in GitHub Desktop.
Basic Logging
#!/bin/sh
echo "Status Script Running";
DATE=$(date);
WHO=$(who);
UPTIME=$(uptime);
#PSTREE=$(pstree)
RESULT=$DATE"\n"$WHO"\n"$UPTIME
## Change where you want the log to save.
echo $RESULT > $(date +%Y%m%d%H%M%S)_custom_status_log.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment