| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | May 3 2001 2:11am |
| Subject: | Re: specifying a delimiter | ||
| View as plain text | |||
At 10:01 AM -0500 5/2/01, admin@stripped wrote: >Hi, >Being new to MySQL, I am having a problem getting output from it to the >shell that is formatted the way I need. I need a table to be written to a >file with a delimiter. >something like : > >#!/bin/sh >mysql -uroot -ptest database < sql > >Then I run that script like this: >./script.sh > output.txt > >Any delimiter is ok except for tab. Is this possible? >Thanks, in advance, Not with mysql by itself. You can use sed or tr to change the tab in mysql's output to something else. The syntax for tr varies among systems, but on one of my systems (RedHat), both of these work: mysql .... < sql | tr '\t' : mysql .... < sql | tr '\011' : -- Paul DuBois, paul@stripped
| Thread | ||
|---|---|---|
| • MySQL can't open mysql.sock on start | Chad Nantais | 2 May |
| • Re: MySQL can't open mysql.sock on start | Gerald Clark | 2 May |
| • specifying a delimiter | admin | 2 May |
| • Re: specifying a delimiter | Paul DuBois | 3 May |
| • Re: specifying a delimiter | Paul DuBois | 3 May |
| • RE: specifying a delimiter | admin | 4 May |
| • RE: specifying a delimiter | Paul DuBois | 4 May |
| • space in column name and table name, standard?. | Mohamad Ilhami | 4 May |
| • Re: space in column name and table name, standard?. | Rolf Hopkins | 4 May |
| • Re: space in column name and table name, standard?. | Van | 4 May |
| • RE: specifying a delimiter | Don Read | 4 May |
