Reputation: 2713
I think its the case that you can't just assign the stdout to stderr because other things might have already cached (?) stdout by the time the reassignment takes place.
So how do I do this (using Linux)?
Upvotes: 39
Views: 22003
Reputation: 19158
To redirect the stdout to stderr, use your command as follows :-
$ command-name 1>&2
where command-name
is the command you're going to feed, 1 represents stdout
and 2 represents stderr
.
Upvotes: 58