To-Slalom

is Puppy

Apr 4th, 2021 (edited)
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. #!/bin/bash
  2. ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
  3. NAME=$(grep -oP '(?<=^NAME=).+' /etc/os-release | tr -d '"')
  4. VERSION=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')
  5. echo " puppy id -> $ID"
  6. echo " puppy version -> $VERSION"
  7. echo " puppy name -> $NAME"
  8.  
  9. if [[ ${NAME} == "Puppy" ]] ; then
  10.     echo "Its a puppy"
  11. else
  12.     echo " This script is only for Puppy OS "
  13. fi
  14.  
Add Comment
Please, Sign In to add comment