Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2008
    Posts
    1

    Unanswered: Exiting from Topas

    Hey everybody,

    I am an amateur scripter and I have written a Korn shell script to verify some system configurations. Here is some part of my code

    Code:
    pause() {
            echo "Press Enter to continue ........"
            read
            clear
    }
    
    echo "-------------------------------------------------"
    echo "5. Verify sudo, tar and libpng is installed"
    echo "-------------------------------------------------"
    rpm -qa|egrep "tar|libpng|sudo"
    pause
    Every thing works except when i hit the following code in my script

    Code:
    echo "-------------------------------------------------"
    echo "33. Verify topas is installed"
    echo "-------------------------------------------------"
    topas
    pause
    Topas starts, i hit Ctrl+C to exit, it exits topas, but the script execution also ends.

    Is there a way i can return control to script after exiting from topas?

    Thanks

  2. #2
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    I have no idea what topas is but could you do something like this to test if it exists :
    Code:
    #!/bin/ksh
    
    CODE_LOC=`whereis topas | sed 's/.*://'`
    
    if test "$CODE_LOC" > ""
    then
            echo topas exists
    else
            echo topas unknown
    fi
    
    exit 0
    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •