What would the perl commands be for this script?
I have a short bash script that finds the release ID in /etc/os-release,
and prints a string based on that result. I would like to convert it to
perl, if possible. I'll appreciate any help with this.
Here is the script that I'm using:
#!/bin/bash
grep "ID=fedora" /etc/os-release > /dev/null 2>&1
if [ $? = 0 ]; then
echo "You are running Fedora"
else
echo "You are running Ubuntu"
fi
Thanks, and have a great day.:) Patrick.
No comments:
Post a Comment