Display a menu on bottom right of screen


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Display a menu on bottom right of screen
# 1  
Old 07-01-2010
Display a menu on bottom right of screen

Hi,
I have a menu of around 10 lines with options.
I want to display it in bottom right corner of screen for better display.


I can do it with clear screen. But I don't want to use it, because it will clear the existing text. After one choice from menu is executed, the menu should just place itself on bottom right corner of screen without clearing the text above.

I have no idea how to do it in korn shell.
Does korn allow to print text on particular pixels/locations on screen as it is possible with C?
Can anyone give me any idea?
# 2  
Old 07-01-2010
i dont know about exact pixel location and stuff as you can do in C "graphics"
but in here you can unix. with echo command something like this:-

Code:
echo "                                                                                                   MENU
                                                                                                            1) no. 1"

this will not solve your purpose exactly. but its a way you can try if you need it right now.
# 3  
Old 07-01-2010
Code:
#!/usr/local/bin/ksh93

# option 1: ls
# option 2: ls -l
# option 10: exit
# options 3-10: undefined

function menu {

  for ((i=1;i<=10;i++)); do printf "%80s\n" "$i. option $i "; done

  printf "%77s" " ->  "

  read opt

   case $opt in
	"1") ls; menu;;
	"2") ls -l; menu;;
	"10") exit;;
	*) echo "Invalid or undefined option!"; menu;;
   esac

}


#printf "\n\n\n\n\n\n\n\n\n\n\n\n\n"
menu

# 4  
Old 07-01-2010
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do we display specific row of an output from bottom given line number?

I pass a number to my script. Passing "1" below. ./getfile.sh 1 echo "User entered: $1" ls -ltr *.conf | sed -n '$p' I wish to use ls -ltr i.e list files in ascending order of time the latest showing at the bottom of the output. Number 1 should get me the last row of ls -ltr output i.e... (9 Replies)
Discussion started by: mohtashims
9 Replies

2. Post Here to Contact Site Administrators and Moderators

Newbie reports: some posts show only the title and bottom-of-page menu. No text in the middle!

When I try to look at some of the posts (like "Rookie Grandmother"), I see the thread title and the menu at the bottom, but not the text of the post in the middle. I can see ALL of the posts in the Recent menu, but NONE of the others. The screenshot I attached shows the situation. I just... (2 Replies)
Discussion started by: JRWoodward
2 Replies

3. Shell Programming and Scripting

Display user selction from bash menu

I am trying to display the text the user selects from a bash menu. The below will display the menu and allow the user to enter a number, but will not display the choice selected. bash while true do printf "\n please make a selection from the MENU \n ... (4 Replies)
Discussion started by: cmccabe
4 Replies

4. Shell Programming and Scripting

Update Statement User menu input screen

Hi Guys, Any good reference for me to perform user database update statement on table which has quite number of fields could be updated depend on user specified column name and the value to assign. All the approaches are welcome and appreciated. Thanks. (1 Reply)
Discussion started by: ckwan123
1 Replies

5. UNIX for Advanced & Expert Users

How to display the files on screen

I connect via vnc to a linux computer. after a logout, I cannot see the files on the screen (although i can see the screensaver). I can open a terminal and see the files etc. How can i see the files on the screen again? (5 Replies)
Discussion started by: FelipeAd
5 Replies

6. Shell Programming and Scripting

Menu / Log files - reading / display

So I'm pretty green still at this, and right now I don't even have the IF statements in just trying to get this part to work. I want to basically click optino 1,2,3,4 for which logs I want to search, and then be able to put in the variable I want to grep out? Sounds easy just not clear in my mind... (4 Replies)
Discussion started by: xgringo
4 Replies

7. AIX

Increasing screen display size

Hi, How can i increase the size of my display on AIX 5.3.What i mean is e.g if i do and ps -ef i would get some like: /data/app/oracle/product/10.2 /usr/bin/ksh /usr/local/bin/s i want it to show the whole thing on the screen without cutting it,because there is still space on the screen... (0 Replies)
Discussion started by: sellafrica1
0 Replies

8. Shell Programming and Scripting

Menu at the bottom

Hi everyone, I'm new to Linux and bash scripting. Question? How can I display a menu at the bottom of the screen when displaying a content of a file with the less command? Like in gvim with bash support, when debugging or testing your script this text "Press enter or type command to... (0 Replies)
Discussion started by: Qwond
0 Replies

9. Shell Programming and Scripting

screen display help

Hello All, I have a file that is formatted like this 1234556 1234567 1234588 1123888 1999999 1010101 1919191 1919191.... for a total of 26000 + lines how do I get a script to read lets say 50 lines at a time and display the output to the screen in column format around 5 or 6... (2 Replies)
Discussion started by: zilla30066
2 Replies

10. Shell Programming and Scripting

controlling screen display

How can I control the screen output when trying to read a large file onto the screen x number of lines at a time. I'm trying to use this is a bourne shell script. I want to display 10 lines of a file, pause the screen so that a user can read the file, and then display the next 10 lines of the file,... (6 Replies)
Discussion started by: jrdnoland1
6 Replies
Login or Register to Ask a Question