tofino_surfer |
12-21-2019 10:06 AM |
Quote:
Well not that sophisticated - I tried it and got:-
|
This is exactly what it's supposed to do, print a header for each file name and have the output separated by blank lines. What were you expecting ? I was comparing it to the earlier post #2
which simply dumps all output together in one block without telling which output comes from which file or even separating the output with blank lines.
Quote:
The True answer is
DISTRIB_CODENAME=cindy
DISTRIB_DESCRIPTION="LMDE 3 Cindy"
|
You don't seem to understand this but this is only from the lsb-release file. I use Fedora and don't have this file.
Code:
$ for f in /etc/*release*; do echo -e "$f:\n"; cat $f; echo ""; done
/etc/fedora-release:
Fedora release 30 (Thirty)
/etc/os-release:
NAME=Fedora
VERSION="30 (Thirty)"
ID=fedora
VERSION_ID=30
VERSION_CODENAME=""
PLATFORM_ID="platform:f30"
PRETTY_NAME="Fedora 30 (Thirty)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:30"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=30
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=30
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
/etc/redhat-release:
Fedora release 30 (Thirty)
/etc/system-release:
Fedora release 30 (Thirty)
/etc/system-release-cpe:
cpe:/o:fedoraproject:fedora:30
There is no lsb-release file on Fedora and no DISTRIB_CODENAME or DISTRIB_DESCRIPTION anywhere. Your "True answer" doesn't work for Fedora/RH users and likely many other distributions.
Since you don't know what distribution the OP uses or any one else reading this post your "True answer" is meaningless.
My recommendation simply lists and formats all of the available output that actually does exist on a given system.
|