Who is familiar with shell scripting? Need help

Discussion in 'OT Technology' started by suprropmp, May 15, 2007.

  1. suprropmp

    suprropmp New Member

    Joined:
    Nov 28, 2004
    Messages:
    5,326
    Likes Received:
    0
    Location:
    Los Angeles
    Can anybody help me in editing this script so that it displays an "away message" after locking the screen?

    Code:
    trap '' 1 2 3 18
    stty -echo
    echo "Password: \c"
    read pass_1
    echo
    echo "Please enter again to verify: \c"
    read pass_2
    echo
    pass_3 = 
    if [ "$pass_1" = "$pass_2" ]
        then
            tput clear
            until [ "$pass_3" = "$pass_2" ]
            do
                read pass_3
            done
        else
            echo "Passwords do not match" 1>&2
    fi
    stty echo
    
     
  2. suprropmp

    suprropmp New Member

    Joined:
    Nov 28, 2004
    Messages:
    5,326
    Likes Received:
    0
    Location:
    Los Angeles
    I tried adding this after it reads in the password again but it didnt work:

    Code:
    echo "Please enter away message: "
    read awaymsg
    echo "awaymsg"
    
     
  3. suprropmp

    suprropmp New Member

    Joined:
    Nov 28, 2004
    Messages:
    5,326
    Likes Received:
    0
    Location:
    Los Angeles
    nevermind... figured it out
     
  4. RiSk

    RiSk New Member

    Joined:
    Jun 8, 2004
    Messages:
    6,564
    Likes Received:
    0
    Location:
    Irving, Texas
    how did you go about it
     

Share This Page