Guest User

http://unix.stackexchange.com/a/204619/88357

a guest
May 20th, 2015
1,309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. trap 'kill %1; kill %2' SIGINT
  4.  
  5. command1 | tee 1.log | sed -e 's/^/[Command1] /' &
  6. command2 | tee 2.log | sed -e 's/^/[Command2] /' &
  7. command3 | tee 3.log | sed -e 's/^/[Command3] /'
Add Comment
Please, Sign In to add comment