[lxc-users] Clean output for lxc list

Stéphane Graber stgraber at ubuntu.com
Thu Mar 10 07:47:31 UTC 2016


On Thu, Mar 10, 2016 at 02:37:47PM +0700, Fajar A. Nugraha wrote:
> On Thu, Mar 10, 2016 at 11:20 AM, Mark Constable <markc at renta.net> wrote:
> >
> > I'm not sure if this is already possible but a suggestion for lxc list
> > would be to provide a "clean" output option without ascii borders. Using
> > mysql as an example it would be neat if something like this was possible...
> >
> > [[ $(lxc list $HOST -BN -cs) = RUNNING ]] && echo yay || echo nay
> >
> > ~ mysql -e "show databases"
> > +--------------------+
> > | Database           |
> > +--------------------+
> > | information_schema |
> > | mysql              |
> > +--------------------+
> >
> > ~ mysql -Be "show databases"
> > Database
> > information_schema
> > mysql
> >
> > ~ mysql -BNe "show databases"
> > information_schema
> > mysql
> 
> 
> 
> Is there a particular reason you can't work with what's currently available?
> 
> # lxc-ls -1 --running
> api
> 
> # lxc-info -s -n api
> State:          RUNNING
> 
> # lxc-info --version
> 2.0.0.rc5

Because he's using LXD, those tools don't work with LXD containers.

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160310/dd43d648/attachment.sig>


More information about the lxc-users mailing list