Skip to content

Instantly share code, notes, and snippets.

@jshbrntt
Created September 28, 2017 14:10
Show Gist options
  • Save jshbrntt/502bf06136812a80f2472ecc041e92c0 to your computer and use it in GitHub Desktop.
Save jshbrntt/502bf06136812a80f2472ecc041e92c0 to your computer and use it in GitHub Desktop.
Docker - Running multiple commands and logging uniformly
#!/bin/sh
touch /var/log/first.log
touch /var/log/second.log
./first /var/log/first.log 2>&1 | ./second /var/log/second.log 2>&1 | tail -f -n +1 /var/log/first.log /var/log/second.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment