How to format the command output like MySQL output

Colin Law clanlaw at googlemail.com
Sun Oct 20 08:38:59 UTC 2013


On 20 October 2013 02:14, 陶治江 <taozhijiang at gmail.com> wrote:
> 于 2013-10-20 4:05, Colin Law 写道:
>
> On 19 October 2013 17:40, 陶治江 <taozhijiang at gmail.com> wrote:
>
> Hello everylinuxers:
>
> I am now focusing on the development of a script interpretor (some thing
> like shell)
> in embedded environment, and its functions mainly output the data in
> specified
> address. In order to make it seems better, I want to format the output
> result like
> MySQL output listed below for example
>
> +--------+-------------+
> |  address| value           |
> +--------+-------------+
> |  0x1110 | 0x01            |
> +--------+-------------+
> |  0x1111 | 0x00            |
> +--------+-------------+
>
>
> I think it seems good like this, but I do not know how to make out
> it.(someone says awk,
> sed may help, but the environment does not permit it). Is there some libs or
> tools can
> help make output result good and elegent?
>
> What language are you writing your application in?  Python, Ruby or what?
>
> Colin
>
>
> C, and with flex bison

So you are asking how to format output in C?  I must be
misunderstanding your question I think.

Colin




More information about the ubuntu-users mailing list