In the following script I'm coping lshw output to the file and then checking in file match for sn number. If I want to check additional numbers, what the better way to do so?
#!/bin/sh
lshw > lshw.txt
sn=123456
if grep -q $sn lshw.txt; then
echo "Match"
else
echo "Doesn't exist"
fi