Redirecting standard error in Korn shell

How to redirect both standard out and standard error to the same output file in Korn Shell?
Environment is HP .... Korn Shell
EmadGirgisAsked:
Who is Participating?
 
ozoCommented:
>file 2>&1
0
 
EmadGirgisAuthor Commented:
Actually this didn't work.
the way to make it work is to swap the >filfe  with 2>&1

So this is how It worked

$ Program_name 2>&1 > /tmp/result_file.tmp
0
 
EmadGirgisAuthor Commented:
Actually this didn't work.
the way to make it work is to swap the >filfe  with 2>&1

So this is how It worked

$ Program_name 2>&1 > /tmp/result_file.tmp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.