The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 05-23-2006
System Shock's Avatar
System Shock System Shock is offline Forum Advisor  
Registered User
  
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 521
Well, don't use readline to ask the user where he wants to go, then.

I have no idea what other things your huge modular script does, but whatever it does, it'll all go away once it exits - other than output redirected to a file, deleted/created files, and such - just like the cd command.

The best I can give you is:

1.- create a user for each project, so users can su to it and be in the right directory, with the right environment, etc.

2.- Use expect. Expect has an "interact' command which gives the user control of the shell back within the script.