Created
August 30, 2022 03:59
-
-
Save shearichard/3cbc66910848f30cbdb3bce3a54ffffc to your computer and use it in GitHub Desktop.
Shell script to create tmp output with date/time stamp
This file contains 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 | |
# | |
# Pipe output from another command into this shell script | |
# and find the resulting output in a date/time stamped file | |
# in the tmp directory | |
# | |
# Eg | |
# | |
# $ ls -l | ./pipetotmp.sh | |
# | |
exec cat >/tmp/shea-work-$(date +"%y%m%dT%H%M%S.%3N").txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment