Merge pull request #26 from Baitinq/master

Add os-release module
This commit is contained in:
Baitinq 2021-10-21 13:52:16 +01:00 committed by GitHub
commit 15ad2d6a91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

14
modules/os-release Normal file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# Prints out your OS name
PREFIX=' '
get_os_name()
{
OS=$(cat /etc/os-release | head -n 1 | sed 's/NAME=//g')
echo "$PREFIX$OS"
}
get_os_name

14
modules/process_count Normal file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# Prints out your process count
PREFIX=' '
get_proc_count()
{
PROC_COUNT=$(ps -Al | wc -l)
echo "$PREFIX$PROC_COUNT"
}
get_proc_count