Which is the shortest way to get the variable $DISTRIB_CODENAME from /etc/lsb-release?I want to make this somewhat shorter:$ sudo add-apt-repository \  deb http://some-repo/ubuntu $(grep CODENAME lsb-release |sed s/^.*=//g) main
How do I get the DISTRIB_CODENAME?
bash;lsb
You can source that file in bash (or any Bourne-like shell) to set them as shell variables:source /etc/lsb-releasesudo add-apt-repository deb http://some-repo/ubuntu $DISTRIB_CODENAME main