MYSQL-XML-TO-CSV(1)

πŸ“¦ version 1.0.1, in opensuse-leap 16.0

🌸 NAME 🌸

Okay bestie, welcome to the mysql-xml-to-csv(1) page from the General Commands Manual β€” it's literally the glow-up guide for mysql-xml-to-csv β€” Convert MySQL XML output to CSV. XML in, CSV out, no cap. πŸ’…

✨ SYNOPSIS ✨

mysql-xml-to-csv [-E line] [-n value] [-N] [-s separator] [input.xml]

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: mysql-xml-to-csv converts MySQL XML query results β€” like, the ones produced using the mysql(1) command when given the --xml flag β€” into a CSV file. Iconic behavior, honestly.

The XML input is read from input.xml if it's specified; otherwise it comes from standard input. The CSV output gets written to standard output. Very main-character energy: reads quietly, writes to stdout. πŸ¦‹

The first row of the CSV output contains column names unless the -N flag is given.

If the query result set contains zero rows, then by default nothing is output; this behavior can be altered using the -E flag. Yes bestie, zero rows means zero drama by default. πŸ’€

By default NULL column values are converted into the empty string; this behavior can be altered using the -n flag.

The character encoding used for the CVS output is UTF-8. 🌈

πŸŽ€ OPTIONS πŸŽ€

  • -E β€” If the result set contains zero rows, output line followed by a newline character instead of outputting nothing. No validation of line is performed.
  • -n β€” Output value instead of the empty string for NULL values.
  • -N β€” Do not output the column names in the first row of the output file.
  • -s β€” Specify an alternate column separator (default is comma).

🌈 RETURN VALUES 🌈

mysql-xml-to-csv exits with one of the following values:

  • 0 β€” Input was successfully processed.
  • 1 β€” An error occurred.

πŸ¦‹ SEE ALSO πŸ¦‹

πŸ‘‘ AUTHOR πŸ‘‘

Archie L. Cobbs <archie.cobbs@gmail.com>


That's the whole manual, bestie. This page is from Debian and dated September 16, 2024 β€” slay. πŸ’…βœ¨

πŸ“¦ where this page comes from