a2345sooted
a2345sooted

Reputation: 599

printing stdout to console - unix

How do i send stdout to console and stderr to a file? So far the closest I've come is:

eval $JOB_EXEC_CMD >> $LOG_FILE 1>&2

but this writing both the logs and output to console. I just want stdout to console and everything else to file

Thanks in advance

Upvotes: 1

Views: 60

Answers (1)

Richard Hum
Richard Hum

Reputation: 651

eval $JOB_EXEC_CMD 2>> $LOG_FILE

This should do the trick.

Upvotes: 1

Related Questions