Created
May 8, 2021 05:47
-
-
Save rjoydip-zz/d7a75f54d9a73ad6f9c2a812e77306dd to your computer and use it in GitHub Desktop.
Extract terminal output and create a log file
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 | |
npm start | while IFS= read -r line; do printf '%s %s\n' "[$(date "+%Y-%m-%d %H:%M:%S")]" "$line"; done >>/log/logger.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment