"Fossies" - the Fresh Open Source Software Archive

Member "systeminfo/report/route.sh" (4 Feb 2005, 2499 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 # Routing Table Generation
    3 
    4 while read line; do
    5 
    6 echo $line | grep -q 'Destination</span><br>'
    7 if [[ $? -eq 0 ]]
    8 then
    9     echo $line;
   10     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $1 }' | while read ln; do 
   11         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   12     done
   13 fi
   14 echo $line | grep -q 'Gateway</span><br>'
   15 if [[ $? -eq 0 ]]
   16 then
   17     echo $line;
   18     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $2 }' | while read ln; do 
   19         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   20     done
   21 fi
   22 echo $line | grep -q 'Genmask</span><br>'
   23 if [[ $? -eq 0 ]]
   24 then
   25     echo $line;
   26     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $3 }' | while read ln; do 
   27         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   28     done
   29 fi
   30 echo $line | grep -q 'Flags</span><br>'
   31 if [[ $? -eq 0 ]]
   32 then
   33     echo $line;
   34     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $4 }' | while read ln; do 
   35         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   36     done
   37 fi
   38 echo $line | grep -q 'MSS</span><br>'
   39 if [[ $? -eq 0 ]]
   40 then
   41     echo $line;
   42     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $5 }' | while read ln; do 
   43         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   44     done
   45 fi
   46 echo $line | grep -q 'Window</span><br>'
   47 if [[ $? -eq 0 ]]
   48 then
   49     echo $line;
   50     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $6 }' | while read ln; do 
   51         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   52     done
   53 fi
   54 echo $line | grep -q 'irtt</span><br>'
   55 if [[ $? -eq 0 ]]
   56 then
   57     echo $line;
   58     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $7 }' | while read ln; do 
   59         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   60     done
   61 fi
   62 echo $line | grep -q 'Iface</span><br>'
   63 if [[ $? -eq 0 ]]
   64 then
   65     echo $line;
   66     route -n | grep -Ev 'Kernel|Destination' | awk '{ print $8 }' | while read ln; do 
   67         echo '<span style="font-weight: normal;">'$ln'</span><br style="font-weight: normal;">'; 
   68     done
   69 fi
   70 echo $line | grep -Evq 'Iface</span><br>|irtt</span><br>|Window</span><br>|MSS</span><br>|Flags</span><br>|Genmask</span><br>|Gateway</span><br>|Destination</span><br>'
   71 if [[ $? -eq 0 ]]
   72 then
   73     echo $line
   74 fi    
   75 done < route.html > $1/route.html