"Fossies" - the Fresh Open Source Software Archive

Member "systeminfo/report/ioport.sh" (4 Feb 2005, 416 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 "PortStart - PortEnd - PortName<br>"
    9     awk '{ split($1,a,"-"); print "0x"a[1]" 0x"a[2]"  "$3 }' /proc/ioports | while read start end name
   10     do
   11         echo "$(($start))-$(($end)) $name<br>"
   12     done
   13 else
   14     echo $line
   15 fi
   16 done < ioport.html > $1/ioport.html