目的
- MySQLで結果の出力からヘッダを消して、値のみを出力したい
方法
以下のオプションを使う
-N
--skip-column-names
-s
--silent
利用例
mysql -sN -e "SELECT * FROM example"
参考リンク
- mysql - man pages section 1: User Commands
o --skip-column-names, -N
Do not write column names in results.
o --silent, -s
Silent mode. Produce less output. This option can be given multiple times to produce less and less output.