I have been able to put together a simple .sh menu. How could I convert this into a tab or arrow controlled dream come true
#! /bin/sh # nano's simple but non perl menu MY_ID=`id -u` NANO_HOME="$HOME/nanohurtz" MY_SAVE=`ls -1 $NANO_HOME/lib/save |grep -v .bak |grep ^$MY_ID` f_save() { cp $NANO_HOME/lib/save/$MY_SAVE $NANO_HOME/lib/save/$MY_SAVE.bak ls -l $NANO_HOME/lib/save/ echo -n -- ENTER -- read dummy f_nanohurtz } f_restore() { cp $NANO_HOME/lib/save/$MY_SAVE.bak $NANO_HOME/lib/save/$MY_SAVE ls -l $NANO_HOME/lib/save/ echo -n -- ENTER -- read dummy f_nanohurtz } f_menu() { tput clear cat << EOF nanohurtz interactive backup/restore menu (by none other than nanohurt +z) S) Save - Create a backup of current savefile R) Restore - Restore last saved file EOF echo -n "Prompt> " read _my_choice case "$_my_choice" in S|s) f_save ;; R|r) f_restore ;; esac } f_menu

In reply to Simple Arrow or Tab Controlled Menus by nanohurtz
in thread Simple Arrow or Tab Controlled Menus by nanohurtz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.