Hi.
Hm. I consider this a feature as you wouldn't be able to distinguish
columns anymore. In fact, I think there is no intention in this
behaviour, but that -N was simply introduced for horizontal view and
vertical view was not considered. But I may be wrong about this.
Is there a special reason I am missing why you are trying to obtain
that with vertical output? The following gives me the output you
described for your example below:
echo "select content from entry_all where gid=10856 and eid=40037" \
| mysql --raw --skip-column-names mydatabase
or alternatively
mysql --raw --skip-column-names mydatabase --execute \
"select content from entry_all where gid=10856 and eid=40037"
Regards,
Benjamin.
On Thu, May 16, 2002 at 02:32:14PM +0200, tsp@stripped wrote:
> Hi
>
> I am calling the mysql command line tool (Ver 11.19) from a shell script.
> I want to retrieve data from a TEXT column and I want to have all these
> '\n' expanded and no column names printed in my results or anything else
> except formatted data.
>
> Example:
>
> echo "SELECT bgetxt FROM plaintext WHERE id = 1000;" \
> | mysql --vertical --skip-column-names mydatabase
>
> and it returns:
>
> *************************** 1. row ***************************
> bgetxt: 102 IV 113
>
> 28. Urteil des Kassationshofes vom 26. März 1976 i.S. H. gegen
> Staatsanwaltschaft des Kantons Graubünden. Regeste
>
> Art. 35 Abs. 2 SVG.
>
> Wer hinter einem Fahrzeug nach links ausschert, um vorerst zu
> prüfen, ob überholt werden könne, hat dadurch mit dem Überholen
> noch
> nicht begonnen.
> <snip>
> ---------------------------------
>
> As far as I can see I need the -E option to expand '\n' but it ignores -N
> in this case. Is this by design or is this a bug?
>
> I checked the source and found that function 'print_table_data_vertically'
> does not check for the value of 'skip-column-names'. However, this seems
> easy to add but would change the behaviour of the program and possibly
> break some scripts.
>
> Further on my wish list is an option to suppress printing a line of
> asterisks and the row number in --vertical mode.
[...]
--
benjamin-mysql@stripped