Redirection Operator in Linux

Have you used 2&>1

./startmyservice.sh 2>&1 tee startmyservicelogs.log

This is going to redirect standard error to standard output and standard output to some_file and print it to standard output also.

And tee command reads the standard input and writes it to both the standard output and one or more files mentioned.

We could say merge stderr to the file.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store