#!/bin/bash
# get gpu & make lower case
GPU=$(lspci | grep -iE "vga")
GPU=$(echo $GPU | tr '[:upper:]' '[:lower:]')
# [TEST] output to check
echo "lspci output for vga device is: $GPU"
echo
echo loop the device
for indices in $GPU
do
# check gpu
case $indices in
[radeon)
echo "string Radeon found."
g="AMD Radeon"
break
;;
[amd/ati])
echo "string AMD/ATI found."
g="AMD ATI"
break
;;
intel)
echo "i dont have a intel gpu, so please check the output from lspci"
g="INTEL?"
break
;;
nvidia)
echo "i dont have a nvidia gpu, so please check the output from lspci"
g="NVIDIA?"
break
;;
esac
done
echo "VGA Device: $g"
First get the vga-Device from the lspci-command and make all lowercase.
Then split the output into individual strings and use âcaseâ in the for loop to determine the individual string. On hit set an return and exit the loop.
my program is a âfetch scriptâ you can check it out https://github.com/stuffbymax/sysi also thanks for the coments also if you check it pls give me feedback
Shame on you.
Not only you offend humans, but you also make fun of them by asking help to improve a robot-made script, which already has stolen other humansâ code/effort and Licenses/Copyright etc.
If you continue this road, you will soon know only one language, the one to communicate with robots, until they see how weak you have become and blow you out in space!
Next time you ask for help, you have to clearly state that you are a robot slave and you act in the name of your Masters.
If you donât mind the suggestion, you could make this distinction a little more obvious because I believe I noticed other folks confused by this same point on another thread.
If you break the comment about AI out of the actual title of the README, that should make it more clear. For example:
No, I am happy for you to adopt that suggestion in any form you like without receiving any credit at all.
It was only meant to be a small note, not a contribution to the project or anything. Although, it is admirable you are taking the matter of giving proper credit so seriously.