On a Linux system, how would I redirect stdout to stderr? On a Linux system, how would I redirect stdout to stderr? linux linux

On a Linux system, how would I redirect stdout to stderr?


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 .