Results 1 to 5 of 5

Thread: How to develop an interactive script in Unix systems

  1. #1
    Join Date
    Feb 2006
    Posts
    176

    How to develop an interactive script in Unix systems

    Hello, I'd like to create a script that runs interactively, here is an example of implementation:

    The user is in the current directory.

    Once the script started:
    - If the user types 1, he set up a directory
    - If the user types 0, he returns in the current directory
    - If the user types s, it ends the script

    I know the read but I do not know how to use it to make the interactive script.

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291
    See this for instance:
    http://swoolley.org/man.cgi/read

  3. #3
    Join Date
    Dec 2007
    Posts
    1,599
    Here is a quick explanation for then read:

    Code:
    OPTION # Lis read a line and puts in $ OPTION 
    in case $ OPTION
    1) 
     # Stuff 
    ;; 
    0) 
    # More stuff 
    ;; 
    * ) 
      # default stuff # Default stuff 
    ;;
    esac

  4. #4
    Join Date
    Dec 2007
    Posts
    1,736
    Just search "read man 1" in this case: http://linux.die.net/man/1/read

  5. #5
    Join Date
    Oct 2008
    Posts
    1
    Hi Complements To all


    to make script working you must visit google and search the related topic to script making and also copy some tips and tricks to create them! and also other html related topics are also interesting out there you can find using the google

Similar Threads

  1. Parsing the file in Unix shell script
    By Macarenas in forum Software Development
    Replies: 3
    Last Post: 23-11-2009, 11:32 AM
  2. Interactive Rename and Domain Join Script Needed
    By sc in forum Windows Server Help
    Replies: 3
    Last Post: 28-12-2008, 04:08 PM
  3. Unix Shell Script
    By BlackSunReyes in forum Software Development
    Replies: 3
    Last Post: 12-08-2008, 01:57 PM
  4. Script to logoff XP systems after inactivity
    By aja44 in forum Windows Server Help
    Replies: 3
    Last Post: 03-03-2008, 03:11 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,055,201.40127 seconds with 17 queries