When I view the result of a SELECT with MySQL Workbench, it's correct with one single \
max@host 10:13:58: ~$ mysql -h db-master.domain.local -uuser -ppw db -e '
> SELECT
> DISTINCT i.filesourceregexp
> FROM db.ImportLogFiles i'
+------------------------------------------------+
| filesourceregexp |
+------------------------------------------------+
| ^[0-9]{8}_1062355673_merge_google_pbn\.csv$ |
| ^[0-9]{8}_8026062435_merge_google_pbn\.csv$ |
| ^[0-9]{8}_1062355673_store_visits_report\.csv$ |
+------------------------------------------------+
max@host 10:14:10: ~$ mysql -h db-master.domain.local -uuser -ppw db -e '
SELECT
DISTINCT i.filesourceregexp
FROM db.ImportLogFiles i' | tail -n +2
^[0-9]{8}_1062355673_merge_google_pbn\\.csv$
^[0-9]{8}_8026062435_merge_google_pbn\\.csv$
^[0-9]{8}_1062355673_store_visits_report\\.csv$
max@host 10:14:19: ~$
I have these options in my.cnf:
[client]
host = db-master
user = user
password = pass
default-character-set=utf8
Why does piping the result through tail change the output/string? (note the double \).