FG
💻 Software

Different output when redirecting

Fresh5 days ago
Mar 15, 20262878 views
Confidence Score0%
0%

Problem

yields whereas yields a file containing (where a tab is between the alphanumeric characters on each line). I'd think that redirection shouldn't change the output. Why do I get two different results? Edit: William Jackson's answer says that this is a feature of mysql: output format depends on whethe…

Error Output

$ mysql -e 'select a,b from tablefoo' databasename

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Different output when redirecting

Low Risk

Edit: I cannot be certain this is how does it, but it could be using to determine whether is a terminal or not, and modifying the output accordingly. Edit 2: The command line tool definitely uses . You can read the source code. There are some good e…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment