Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Another linux info

OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
VERSION=$(awk '/DISTRIB_RELEASE=/' /etc/*-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]0/./')

if [ -z "$OS" ]; then
    OS=$(awk '{print $1}' /etc/*-release | tr '[:upper:]' '[:lower:]')
fi

if [ -z "$VERSION" ]; then
    VERSION=$(awk '{print $3}' /etc/*-release)
fi

echo $OS
echo $ARCH
echo $VERSION
Comment

PREVIOUS NEXT
Code Example
Shell :: use -i to suggest an answer 
Shell :: install any desc ubunto 
Shell :: use vim or perl to replace the cdc_ string in chromedriver 
Shell :: sc CentOS 
Shell :: skolen.min 
Shell :: ignoring time stamp from the future mac 
Shell :: iterm full screen cmd 
Shell :: screen sharung zoom linux x11 
Shell :: turn off history bash mac 
Shell :: bitbake availables images 
Shell :: last_ack 
Shell :: cantidad de digitos 
Shell :: smb cant write to mounted 
Shell :: linux strip executable 
Shell :: check if global packages are up to date 
Shell :: zsh leading zeros 
Shell :: tail and watch directory linux 
Shell :: webgl server 
Shell :: change bash suggestions to be case insensitive 
Shell :: how to check superwiser status in ubanti 
Shell :: untracked by gitlab 
Shell :: how to install bokeh version 2.4.1 rather than 2.4.2 
Shell :: linux where to install 3rd party driver 
Shell :: Exception: No Linux desktop project configured. See 
Shell :: tke cli 
Shell :: json rpc ethereum 
Shell :: tar –exclude directories from a File 
Shell :: mana toolkit install 
Shell :: mac see what is ruuning on a port 
Shell :: remove the override manually with dpkg-statoverride 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =