When I run the following command:
I get the following output:
But I only want to get the container specified in the command not all of them.
How can I do that?
You can use POSIX Extended Regular Expressions:
lxc list -c n '^ubuntu$' +--------+ | NAME | +--------+ | ubuntu | +--------+
If you don't want the formatting just use the --format csv switch, which will output just ubuntu
--format csv
ubuntu
Copyright © 2021 Jogjafile Inc.
You can use POSIX Extended Regular Expressions:
If you don't want the formatting just use the
--format csv
switch, which will output justubuntu