Created
January 18, 2020 22:33
-
-
Save airbr/d87b89e11d9263cfa4b7dc6e1ce6ae92 to your computer and use it in GitHub Desktop.
Basic Logging
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/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