How can I limit the width of column returned by a query?
In a bash script I am returning an ID, and a text field from a table. 
The text field can be any length, contain newlines, etc. The problems is 
if a row of results contains a new line, the "grid" of rows and columns 
is messed up. I can limit the length of the returned text with 
substr(test,1,80), but that doesn't stop the newline appearing in the 
output. Neither does .mode column, .width 3 80 (3 for the ID, 80 for the 
text).
I have tried dozens of combinations of piping the output to sed & tr to 
try and remove any newlines, but if I do so, the output "grid" is all 
crunched together with the next ID on the same row as the previous text.

What I need is for each row of the query results to end at 80 characters 
or so and not wrap to another line - ie: one row per line.
I hope I am making sense here.
Any suggestions appreciated.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to