Files
atap/ATAPAuditor/Helpers/ShellScripts/Ubuntu22.04_Debian12/1.6.1.sh
T
2026-05-11 09:15:08 +02:00

16 lines
393 B
Bash

#!/usr/bin/env bash
# Extract the OS ID from /etc/os-release
OS_ID=$(grep '^ID=' /etc/os-release | cut -d= -f2 | sed -e 's/"//g')
# Run the grep command with the OS ID incorporated
grep -Eis "(\\v|\\r|\\m|\\s|$OS_ID)" /etc/motd
# Check the exit code of the grep command
if [ $? -ne 0 ]; then
# Grep did not find any matches, return 0
exit 0
else
# Grep found matches, return 1
exit 1
fi