1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add a -column option to the sqlite command-line utility.

Patch from Matthew O. Persico. (CVS 522)

FossilOrigin-Name: 760bf568c882d7b28746b1e004309ef08d2ff4c0
This commit is contained in:
drh
2002-04-08 02:42:57 +00:00
parent 6ed41ad735
commit 8b32e17d26
3 changed files with 12 additions and 8 deletions

View File

@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.48 2002/04/04 15:10:12 drh Exp $
** $Id: shell.c,v 1.49 2002/04/08 02:42:58 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
@ -855,6 +855,10 @@ int main(int argc, char **argv){
data.mode = MODE_Line;
argc--;
argv++;
}else if( strcmp(argv[1],"-column")==0 ){
data.mode = MODE_Column;
argc--;
argv++;
}else if( argc>=3 && strcmp(argv[1],"-separator")==0 ){
sprintf(data.separator,"%.*s",(int)sizeof(data.separator)-1,argv[2]);
argc -= 2;