Skip to main content
removed obsolete remark
Source Link
Lesmana
  • 28.1k
  • 20
  • 85
  • 87
echo "Error Text." 2>&1

takes the standard error and redirects it to standard output, but echo outputs to stdout anyways. It looks like you were trying to do >&2 instead.

In addition, |& in bash is just a (not terribly portable) shortcut for 2>&1 |, so you should see every line indented anyways.

echo "Error Text." 2>&1

takes the standard error and redirects it to standard output, but echo outputs to stdout anyways. It looks like you were trying to do >&2 instead.

In addition, |& in bash is just a (not terribly portable) shortcut for 2>&1 |, so you should see every line indented anyways.

|& in bash is just a (not terribly portable) shortcut for 2>&1 |, so you should see every line indented.

deleted 1 characters in body
Source Link
jw013
  • 52.9k
  • 11
  • 143
  • 142
echo "Error Text." 2>&1

takes the standard error and redirects it to standard output, but echo outputs to stdout anyways. It looks like you were trying to do >&2 instead.

In addition, |& in bash is just a (not terribly portable) shortcut for 2>&1 |. So, so you should see every line indented anyways.

echo "Error Text." 2>&1

takes the standard error and redirects it to standard output, but echo outputs to stdout anyways. It looks like you were trying to do >&2 instead.

In addition, |& in bash is just a (not terribly portable) shortcut for 2>&1 |. So you should see every line indented anyways.

echo "Error Text." 2>&1

takes the standard error and redirects it to standard output, but echo outputs to stdout anyways. It looks like you were trying to do >&2 instead.

In addition, |& in bash is just a (not terribly portable) shortcut for 2>&1 |, so you should see every line indented anyways.

Source Link
jw013
  • 52.9k
  • 11
  • 143
  • 142

echo "Error Text." 2>&1

takes the standard error and redirects it to standard output, but echo outputs to stdout anyways. It looks like you were trying to do >&2 instead.

In addition, |& in bash is just a (not terribly portable) shortcut for 2>&1 |. So you should see every line indented anyways.