I am pretty green when it comes to grep
, can someone point out how I can get an array in bash
of the list of snapshot names (NOTE: just the names) when I do a lxc info mycontainer
?
My current results are:
root@hosting:~/LXC-Commander# lxc info mycontainer --verbose
Name: mycontainer
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2017/05/01 21:27 UTC
Status: Running
Type: persistent
Profiles: mine
Pid: 23304
Ips:
eth0: inet 10.58.122.150 vethDRS01G
eth0: inet6 fd9b:16e1:3513:f396:216:3eff:feb1:c997 vethDRS01G
eth0: inet6 fe80::216:3eff:feb1:c997 vethDRS01G
lo: inet 127.0.0.1
lo: inet6 ::1
Resources:
Processes: 1324
Memory usage:
Memory (current): 306.63MB
Memory (peak): 541.42MB
Network usage:
eth0:
Bytes received: 289.16kB
Bytes sent: 881.73kB
Packets received: 692
Packets sent: 651
lo:
Bytes received: 1.51MB
Bytes sent: 1.51MB
Packets received: 740
Packets sent: 740
Snapshots:
2017-04-29-mycontainer (taken at 2017/04/29 21:54 UTC) (stateless)
2017-04-30-mycontainer (taken at 2017/04/30 21:54 UTC) (stateless)
2017-05-01-mycontainer (taken at 2017/05/01 21:54 UTC) (stateless)
With my ultimate goal of simply containing an array such as: 2017-04-29-mycontainer 2017-04-30-mycontainer 2017-05-01-mycontainer