#! /bin/bash
#
# script to collect hardware and software data on your system
# you'll need to be root to get proper results
# tested on Debian based systems, with the required lshw package
# installed and Mandriva 2009, who has the lshw package as well
# other distributions may work, if the lshw package is avalable and installed
# with contributions by Nelz and Ollie from the LXF forums
# see http://www.linuxformat.co.uk/index.php?name=PNphpBB2&file=viewtopic&t=8332
# this script is released under the GPL: http://www.gnu.org/copyleft/gpl.html
# current version: 0.006

# when did you last run this script?
echo ========= >> mysystem.txt
echo "System info at:" `date` >> mysystem.txt
echo ========= >> mysystem.txt
# what kernel are you running?
echo "Kernel details:" >> mysystem.txt
cat /proc/version >>mysystem.txt
echo "Distro LSB details:" >> mysystem.txt
[[ -f /etc/lsb-release ]] && cat /etc/lsb-release >> mysystem.txt
echo ========= >> mysystem.txt
# check if lshw is installed, then find out all you want from your hardware with lshw
if which lshw &>/dev/null; then
   lshw >> mysystem.txt
else
   echo "You need to install lshw to use this script!"
fi
echo ========= >> mysystem.txt
chmod 644 mysystem.txt
echo "Done! Read the file mysystem.txt in the current directory"
echo "Use the cat and grep commands to select sections of interest if you're on the commandline"
echo "Or open this file in a graphical editor like Kwrite or Gedit. Please, do not use Notepad!!"

exit 0
