Changeset 3623 for trunk/auto-reply

Show
Ignore:
Timestamp:
01/07/04 00:25:10 (5 years ago)
Author:
dreamforce2
Message:

improve security.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/auto-reply/examples/fortune-temp.sh

    r3622 r3623  
    99 
    1010 
    11 # This line store the message the user sent to var A. 
    12 A=`tee` 
     11# This line store the message the user sent to var MSG. 
     12MSG=`tee` 
    1313 
    1414# Checks for the user input and display the data according to it. 
    15 if [ $A = "1" ]; then 
     15if [ "$MSG" = "1" ]; then 
    1616fortune SP 
    1717else 
    18         if [ $A = "2" ]; then 
     18        if [ "$MSG" = "2" ]; then 
    1919        fortune 
    2020        else 
    21                 if [ $A = "3" ]; then 
     21                if [ "$MSG" = "3" ]; then 
    2222                cpu_temp=$(sensors | tail -n 7 | head -1 | cut -d "+" -f 2 | cut -d " " -f 1) 
    2323                mb_temp=$(sensors | tail -n 8 | head -1 | cut -d "+" -f 2 | cut -d " " -f 1) 
     
    2525                echo "Chipset : $mb_temp" 
    2626                else 
    27                         if [ $A = "4" ]; then 
     27                        if [ "$MSG" = "4" ]; then 
    2828                        ping_time=$(ping -c 1 $2 | head -2 | cut -d "=" -f 4,9 | tail -n 1) 
    2929                        echo "Ping takes $ping_time"