KSH "esc=", anything similar?

KSH "esc=", anything similar?

Post by Steve Heit » Fri, 11 Mar 1994 08:02:08



Is there a simple way I can re-create the output KSH gives in "command recall"
mode, ESC and then pressing the "=" key?  Example:

$ ^[=

(where ^[ is the escape key)

outputs;

1) test0
2) test1
3) test2
4) test3
5) test4
6) test5

The files test[0-5] are the files in the current directory.

I would like to be able to use that format for a shell driven menu system I'm
developing for some users.

-Steve
--

_ ___ __   |""""|   __ ___ ___ _______________________________ ___ ___ ___ _    


_|___|-oOo-+----+-oOo-|___|__\ _______________________________ /__|___|___|_

 
 
 

1. Using "if" in "ksh" to change "for loop" values....

Hello,

I have a script that contains this(shown below).  My problem is how do I
change
the values in the "for loop" statement? I tried doing another "if"
statement
but unluckilly I was unsuccessful. Needs some help.

Thanks in advance.

albertus:)

A part of my script.
####
if [[ $1 == "file1" && $2 == "name1" && $# == 2 ]]
then
  some commands.

  var=`commands`

  #If var=A, then my for loop will be "for i in 1 2 3"
  #If var=B, then my for loop will be "for i in 1 2 3 4 5"
  #If var=C, then my for loop will be "for i in 1 2 3 4 5 6 7 8 9 10
  #and so on...  I need to do this with "only one"
  #"for loop" statement.  Any ideas....

  for i in ???
  do
     some commands
  done

else
  some commands...
fi
###

2. ping .vs. cron question

3. GETSERVBYNAME()????????????????????"""""""""""""

4. nsupdate

5. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

6. Sparc 10 vs. P3 800MHz - Web Server (and Sparc 10 value)

7. "be" similar to "su" ?

8. ksoftirqd

9. Heroes 0.18 - a game similar to "Tron" or "Nibbles"

10. The "ESC-ESC" problem

11. How to "escape" from dreaded esc-esc?

12. Any tool similar to "truss" and "snoop" for linux?

13. Type "(", ")" and "{", "}" in X...