Skip to content
Ulrich Berntien edited this page Mar 25, 2019 · 1 revision

getrel

Name

getrel - attempt to get the OS release file

Synopsis

getrel

Description

getrel prints the OS name from the release file.

The function search a release file with pattern /etc/*release. Inside the files the function search a line like “PRETTY_NAME=release name”.

getrel prints the name to stdout. The function prints nothing if the search is not successful.

Example

Run the function. There are no command line arguments.

$ getrel

Files

The function reads the /etc/*release files.

Clone this wiki locally