Changeset 3623 for trunk/auto-reply
- Timestamp:
- 01/07/04 00:25:10 (5 years ago)
- Files:
-
- 1 modified
-
trunk/auto-reply/examples/fortune-temp.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/auto-reply/examples/fortune-temp.sh
r3622 r3623 9 9 10 10 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. 12 MSG=`tee` 13 13 14 14 # Checks for the user input and display the data according to it. 15 if [ $A= "1" ]; then15 if [ "$MSG" = "1" ]; then 16 16 fortune SP 17 17 else 18 if [ $A= "2" ]; then18 if [ "$MSG" = "2" ]; then 19 19 fortune 20 20 else 21 if [ $A= "3" ]; then21 if [ "$MSG" = "3" ]; then 22 22 cpu_temp=$(sensors | tail -n 7 | head -1 | cut -d "+" -f 2 | cut -d " " -f 1) 23 23 mb_temp=$(sensors | tail -n 8 | head -1 | cut -d "+" -f 2 | cut -d " " -f 1) … … 25 25 echo "Chipset : $mb_temp" 26 26 else 27 if [ $A= "4" ]; then27 if [ "$MSG" = "4" ]; then 28 28 ping_time=$(ping -c 1 $2 | head -2 | cut -d "=" -f 4,9 | tail -n 1) 29 29 echo "Ping takes $ping_time"
