"Fossies" - the Fresh Open Source Software Archive

Member "systeminfo/report/process.sh" (4 Feb 2005, 353 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 # Process Information Generator
    3 
    4 top -bn 1 > /tmp/top123.log
    5 while read line; do
    6 echo $line | grep -q '<span style="font-weight:">'
    7 if [[ $? -eq 0 ]]
    8 then
    9     echo $line
   10     while read ln; do
   11     [[ ! -z $ln ]] && echo $ln"<br>"
   12     done < /tmp/top123.log
   13     rm -f /tmp/top123.log
   14 else
   15     echo $line
   16 fi
   17 done < process.html > $1/process.html