To-Slalom

Puppy or not

Apr 7th, 2021 (edited)
123
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. ##############################################################
  3. # Small Script to check whethere im using puppy linux or not #
  4. ##############################################################
  5. ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
  6. NAME=$(grep -oP '(?<=^NAME=).+' /etc/os-release | tr -d '"')
  7. VERSION=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')
  8. echo " puppy id -> $ID"
  9. echo " puppy version -> $VERSION"
  10. echo " puppy name -> $NAME"
  11.  
  12. if [[ ${NAME} == "Puppy" ]] ; then
  13.     echo "Its a puppy"
  14. else
  15.     echo " This script is only for Puppy OS "
  16. fi
RAW Paste Data