"Fossies" - the Fresh Open Source Software Archive

Member "systeminfo/report/general.sh" (4 Feb 2005, 877 Bytes) of package /linux/privat/old/systeminfov12.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # File System Generator
    3 while read line; do
    4 echo $line | grep -q '<span style="font-weight:">'
    5 if [[ $? -eq 0 ]]
    6 then
    7     echo $line
    8 printf "       <b>Hostname :</b> `hostname`\n<br>"
    9 printf "     <b>IP-Address :</b> $(ping `hostname` -c 1 | awk '/^PING/ { print $3 }' | tr -d '()')\n<br>"
   10 printf "  <b>Linux Version :</b> `tr -d '()' < /proc/version | awk '{ print $1" "$2" "$3 }'`\n<br>"
   11 printf "    <b>GCC Version :</b> `tr -d '()' < /proc/version | awk '{ print $5" "$6" "$7" "$8" "$9" "$10" "$11" "$12 }'`\n<br>"
   12 printf "     <b>Build Date :</b> `tr -d '()' < /proc/version |  awk '{ for (i=13;i<=NF;i++) printf $i" " }END { printf "\n";}'`\n<br>"
   13 printf "       <b>Platform :</b> `uname -a | awk '{ print $11" "$12" "$13" "$14 }'`\n<br>"
   14 printf "        <b>Release :</b> `cat /etc/redhat-release`\n"
   15 else
   16     echo $line
   17 fi
   18 done < general.html > $1/general.html