Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 15-10-2008
Member
 
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.
Reply With Quote
  #2  
Old 15-10-2008
Member
 
Join Date: Dec 2007
Posts: 2,273
See this for instance:
http://swoolley.org/man.cgi/read
Reply With Quote
  #3  
Old 15-10-2008
Member
 
Join Date: Dec 2007
Posts: 1,592
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
Reply With Quote
  #4  
Old 15-10-2008
Member
 
Join Date: Dec 2007
Posts: 1,728
Just search "read man 1" in this case: http://linux.die.net/man/1/read
Reply With Quote
  #5  
Old 16-10-2008
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to develop an interactive script in Unix systems"
Thread Thread Starter Forum Replies Last Post
Parsing the file in Unix shell script Macarenas Software Development 3 23-11-2009 11:32 AM
Interactive Rename and Domain Join Script Needed sc Windows Server Help 3 28-12-2008 04:08 PM
Unix Shell Script BlackSunReyes Software Development 3 12-08-2008 01:57 PM
Script to logoff XP systems after inactivity aja44 Windows Server Help 3 03-03-2008 03:11 PM


All times are GMT +5.5. The time now is 05:48 AM.