Visit Our UNIX and Linux User Community

Top Forums Shell Programming and Scripting Help needed to format mysql output Post 302395872 by drl on Wednesday 17th of February 2010 07:14:48 AM
Old 02-17-2010

I suggest that you try this:
echo "${RESULT}"

to get the same result as mysql directly, because the newlines are suppressed when you omit the quotes ... cheers, drl
Test Your Knowledge in Computers #112
Difficulty: Easy
macOS was not the largest Unix largest installed base in 2017.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help needed in date format

i need to grep date in the format year-month-day,,,,,,, actually i need to grep those dates other than current date.......... can anyone help me in this...........i need a format of date which would grep previous date except current date (1 Reply)
Discussion started by: ali560045
1 Replies

2. Shell Programming and Scripting

capturing output from top and format output

Hi all, I'd like to capture the output from the 'top' command to monitor my CPU and Mem utilisation.Currently my command isecho date `top -b -n1 | grep -e Cpu -e Mem` I get the output in 3 separate lines.Tue Feb 24 15:00:03 Cpu(s): 3.4% us, 8.5% sy .. .. Mem: 1011480k total, 226928k used, ....... (4 Replies)
Discussion started by: new2ss
4 Replies

3. Shell Programming and Scripting

convert date format to mysql date format in log file

I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column. I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this? Sample input 02/27/09,23:52:31 02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies

4. UNIX for Dummies Questions & Answers

Changing from Excel date format to MySQL date format

I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd. The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4". This is what I use to change the format: sed -i '' -e... (2 Replies)
Discussion started by: figaro
2 Replies

5. Shell Programming and Scripting

Need help with extracting data to MySQL format

Hi guys, I'm doing a project now and extracting tables from a webpage to MySQL table format. I dumped the webpage with lynx and it is like this id Spec 524543 Developed especially for seniors Spec No Java Spec Yes Java MIDP Spec ... (4 Replies)
Discussion started by: Johanni
4 Replies

6. Shell Programming and Scripting

Need help getting my output from MYSQL query into right format

Good afternoon! I have been lurking in this forum for awhile now. I have just recently started posting. I think this is a really good site. With that being said, I don't like to just run and get an answer before I try my best first. I have poured some blood, sweat and tears into... (4 Replies)
Discussion started by: brianjb
4 Replies

7. UNIX and Linux Applications

Please help: Oracle gqsql or sqlplus output format like mysql

On psql select titolo,lingua from titolo where titolo ~* 'brivid'; titolo | lingua ------- + ------ Brivido | 1 On Sqlplus/gqsql SQL> select titolo,genere,anno,lingua from titolo where titolo like '%rivid%'; TITOLO... (6 Replies)
Discussion started by: Linusolaradm1
6 Replies

8. UNIX for Dummies Questions & Answers

Help! needed to displaying an output in record format

Hi Friends, Am new to Unix world and this is my first post in this forum. I was stuck in displaying the content. while displaying the content the below points to be taken care 1 ) The header format is repeating 2) To display the value in table format... (2 Replies)
Discussion started by: rocky2013
2 Replies

9. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

10. UNIX for Advanced & Expert Users

Help needed on my $format

I am stuck with values in existing program perl script... my $format ="a40a9a*"; please help me to understand what is the value of "a40a9a*". Thanks in advance! (3 Replies)
Discussion started by: Vijay_Data
3 Replies
mysqlshow(1)							  MySQL database						      mysqlshow(1)

mysqlshow - Shows the structure of a mysql database (databases,tables and columns) USAGE
shell> mysqlshow [OPTIONS] [database [table [column]]] SYNOPSIS
mysqlshow [-#|--debug=...] [-?|--help] [-c|--character-sets-dir=...] [-C|--compress] [-h|--host=...] [-i|--status] [-k|--keys] [-p|--password[=...]] [-P|--port=...] [-S|--socket=...] [-u|--user=#] [-V|--version] DESCRIPTION
-#|--debug=... output debug log. Often this is 'd:t:o,filename` -?|--help display help and exit -c|--character-sets-dir=... Directory where character sets are -C|--compress Use compression in server/client protocol -h|--host=... connect to host -i|--status Shows a lot of extra information about each table -k|--keys show keys for table -p|--password[=...] password to use when connecting to server If password is not given it's asked from the tty. -P|--port=... Port number to use for connection -S|--socket=... Socket file to use for connection -u|--user=# user for login if not current user -V|--version output version information and exit NOTE
If last argument contains a shell or SQL wildcard (*,?,% or _) then only what's matched by the wildcard is shown. If no database is given then all matching databases are shown. If no table is given then all matching tables in database are shown If no column is given then all matching columns and columntypes in table are shown SEE ALSO
isamchk(1), isamlog(1), mysql(1), mysqlaccess(1), mysqladmin(1), mysqld(1), mysqld_multi(1), mysqld_safe(1), mysqldump(1), mysql_fix_privi- lege_tables(1), mysql_zap(1), perror(1), replace(1) For more information please refer to the MySQL reference manual, which may already be installed locally and which is also available online at BUGS
Please refer to to report bugs. AUTHOR
Ver 1.0, distribution 4.0.24 Michael (Monty) Widenius (, MySQL AB ( This software comes with no warranty. Manual page by L. (Kill-9) Pedersen (, Mercurmedia Data Model Architect / system developer (http://www.mercur- ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+------------------------------------+ |Availability | SUNWmysqlr, SUNWmysqlu, SUNWmysqlt | +--------------------+------------------------------------+ |Interface Stability | External | +--------------------+------------------------------------+ NOTES
Source for mysql is available on MySQL 4.0 19 December 2000 mysqlshow(1)

Featured Tech Videos

All times are GMT -4. The time now is 11:41 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy