Skip to content

Instantly share code, notes, and snippets.

@KeenS
Created January 20, 2015 06:51
Show Gist options
  • Save KeenS/601f992706e0c7da215f to your computer and use it in GitHub Desktop.
Save KeenS/601f992706e0c7da215f to your computer and use it in GitHub Desktop.
( (for i in $(seq 10);do echo $i.err >&2; echo $i.out ;done | tee out.log ) 2> error.log > all.log 2>&1 :cwd ~/tmp)
(cat out.log :cwd ~/tmp)
1.out
2.out
3.out
4.out
5.out
6.out
7.out
8.out
9.out
10.out
(cat error.log :cwd ~/tmp)
1.err
2.err
3.err
4.err
5.err
6.err
7.err
8.err
9.err
10.err
(cat all.log :cwd ~/tmp)
1.out
1.err
2.err
3.err
4.err
5.err
2.out
3.out
4.out
5.out
6.err
6.out
7.err
7.out
8.err
8.out
9.err
9.out
10.err
10.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment