try
echo "select \"test \n test\"" | mysql -N -B stud > out.txt
Uriel Wittenberg wrote:
> I have a batch file called mysql.txt containing the single line,
>
> select "test \n test";
>
> My command for running this file is:
>
> mysql -N -B stud < mysql.txt > out.txt
>
> After running the command, out.txt contains "test \n test" -- with the
> "\n" appearing literally, instead of a newline character. In other
> words, it's the output I'd expect from
>
> select "test \\n test";
>
> Originator: Uriel Wittenberg
> Organization: Tsinghua U.
> MySQL support: none
> Severity: non-critical
> Priority: medium
> Category: mysql
> Class: sw-bug
> Release: mysql-3.23.42
>
> Exectutable: mysql.exe
> Environment: Pentium processor, 64 MB RAM
> System: Windows Me
>
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread86838@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--
Gerald L. Clark
gerald_clark@stripped
| Thread |
|---|
| • "\n" is SLASH, N instead of <newline> | Uriel Wittenberg | 2 Oct |
| • Re: "\n" is SLASH, N instead of <newline> | Benjamin Pflugmann | 2 Oct |
| • Re: "\n" is SLASH, N instead of <newline> | Uriel Wittenberg | 2 Oct |
| • Re: "\n" is SLASH, N instead of <newline> | Benjamin Pflugmann | 2 Oct |
| • Re: "\n" is SLASH, N instead of <newline> | Gerald Clark | 2 Oct |
| • Re: "\n" is SLASH, N instead of <newline> | Uriel Wittenberg | 3 Oct |
| • Re: "\n" is SLASH, N instead of <newline> | Benjamin Pflugmann | 3 Oct |
| • INSERT INTO SELECT ?? | chong wee siong | 3 Oct |
| • Re: INSERT INTO SELECT ?? | Paul DuBois | 3 Oct |
| • Re: "\n" is SLASH, N instead of <newline> -- SOLUTION (why not mention it?) | Uriel Wittenberg | 4 Oct |
| • Re: "\n" is SLASH, N instead of <newline> -- SOLUTION (why not mention it?) | Benjamin Pflugmann | 4 Oct |
| • Re: "\n" is SLASH, N instead of <newline> -- SOLUTION (why not mention it?) | Uriel Wittenberg | 4 Oct |
| • Re: "\n" is SLASH, N instead of <newline> -- SOLUTION (why not mention it?) | Benjamin Pflugmann | 4 Oct |