Re: PS3 select menu to screen and file?

From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 07/28/04


Date: 28 Jul 2004 20:17:38 GMT

On 2004-07-28, Joshua wrote:
> I use inbuilt menu functionality with ksh e.g.
>
> PS3="Please select an option > "
> select menu_option in "option 1" "option 2"
> do
> case $menu_option in
>
> "option 1")
> displayAppStartupMenu ;;
>
> "option 2")
> searchUsersLogonMenu ;;
> esac
> done
>
> This outputs a menu to screen and takes care of user input. My
> question is, is it possible to also put this information out to a
> file?

    You can use the "script" command to store the entire session in a
    file.

    Or, write your own menu script (it's not hard); select is a PITA
    to use, in any case.

-- 
    Chris F.A. Johnson                  http://cfaj.freeshell.org/shell
    ===================================================================
    My code (if any) in this post is copyright 2004, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License


Relevant Pages

  • Re: Why do I want RTTI?
    ... > The main reason why we have CanvasItemVector in the first place, ... We don't care about the details of each CanvasItem. ... Polymorphism, like many OO terms, does not have a single, universal ... implementing functionality for manipulating objects. ...
    (comp.lang.cpp)
  • Re: BIND in the base
    ... The functionality of 'host' that I care about ... Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: ...
    (freebsd-arch)
  • Re: How many D6 users are left?
    ... ..Net is just some files on the hard disk taking up several tens of megabytes. ... Why should it be considered differently from the hundreds of other DLLs in the average system, each providing some specific functionality? ... as a user of D2007 I need neither know nor care whether the refactoring was done with .Net code or native code. ...
    (borland.public.delphi.non-technical)
  • Forcing open file to close (like My ComputerManage)
    ... I am looking to replicate the functionality you have when ... Files and are able to right-click on an open file and close it. ... Set colResources = objConnection.Resources ... I don't care whether I use WMI, API or whatever - I just need to find ...
    (microsoft.public.vb.general.discussion)
  • Re: manipulating PS1 in sh
    ... EdStevens wrote: ... Most of my systems I am running in ksh, and my PS is set as follows: ... achieving this same functionality under sh (Solaris 5.9)? ...
    (comp.unix.shell)

Loading