script to show menu option & need to be autorun

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script to show menu option & need to be autorun
# 1  
Question script to show menu option & need to be autorun

hi i need to perform following task
have to write script to display menu
like 1) login as user1
2) login as user2
3) login as user3
4) go to shell
script will be run through root user user1, user2 will be logged to specific thr account. if 4th option selected it must pass control to shell.

this script must run on startup. (like somethng in .profile)
i dont know how to run script @startup.

please can anyone help.
i am using solaris unix. (bash)
# 2  
Is this script to display the login screen on the *console* of a Solaris box? Or for a remote connection session? I ask that because normally, Solaris console boots into a GUI -- you can't just display a menu like that.
# 3  
are you looking something like this..
4.return to shell
print "ENTER UR CHOICE==>\c"
read ch;
case $ch in
1) sudo su - user1 ;;
2) sudo su - user2 ;;
3) sudo su - user3 ;;
4) break ;;
*) print "";
   print "";;

# 4  
i also did the same thing.
Do you have any idea? can it be done without SUDO ?
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #628
Difficulty: Easy
In PHP, True !== 1;
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Menu option each on a new line

Here is my script for the menu options. # Bash Menu Script Example PS3='Please enter your choice: ' options=("Option 1:" "Option 2:" "Other Reason:" "Quit") select opt in "${options}" do case $opt in "Option 1 :") echo "you chose choice 1" ;; ... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. Shell Programming and Scripting

Menu Driven Bash Shell Script with Default Option

Hi All, I have written a menu driven bash shell script. Current Output is as below: ------------------------------------- Main Menu ------------------------------------- Option 1 Option 2 Option 3 Option 4 Exit ===================================== Enter your... (3 Replies)
Discussion started by: kiran_j
3 Replies

3. Shell Programming and Scripting

Script to call a menu script and redirect each option to a text file

Hello, I want to design a script that will call an existing menu script and select options one by one and redirict the out put to a file. For example;- In the script there are 10 options i want to design a script that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Discussion started by: spradha
4 Replies

4. Ubuntu

Add Option To Right Menu

hey all, I already installed nautilus-actions now , I want to add "print path" script(option) to the right context menu!.. I did : the script print located in... (2 Replies)
Discussion started by: eawedat
2 Replies

5. Emergency UNIX and Linux Support

Grub Doesn't show menu

Hi guys. I have installed Acronis disk director in windows XP and allocate some free space to install Debian beside fedora. after completion i rebooted and now grub is in command line mode and does not show the menu list. (I didn't remove the fedora partition. I just allocate some space from... (1 Reply)
Discussion started by: majid.merkava
1 Replies

6. UNIX for Dummies Questions & Answers

What is a menu or command line option driven script?

i'm confused what this means. i was asked to design a menu or command line option driven script that reads out of a DB and displays info such as -u <user> -e <event> which would print commands run by <user>with the <event> in the db. any suggestions? i've been using... (2 Replies)
Discussion started by: kpddong
2 Replies

7. SuSE

Write shell script using menu-driven approach to show various system

QUESTION: Write shell script using menu-driven approach to show various system configuration like 1) Currently logged user and his logname 2) Your current shell 3) Your home directory 4) Your current path setting 5) Your current working directory 6) Show Currently logged number of... (1 Reply)
Discussion started by: bboyjervis
1 Replies

8. Shell Programming and Scripting

Can someone show me how to create a menu?

Can someone show me how to create a menu? I want a script someone who is not unix literate can use, with some simple commands like ls -al a directory or find files based on a date, does anyone know how to make a simple menu ? Thanks. (4 Replies)
Discussion started by: taekwondo
4 Replies

9. Shell Programming and Scripting

Unix Shell Script: With Menu Option

I am attempting to create a shell script with the following capaciblities: 1. Listed options to choice from 2. Use to perform awk statements 3. Print a report with the awk results My questions are 1. How do I select more than one file for option #5 and #6 2. How to I create an... (11 Replies)
Discussion started by: jroberson
11 Replies

10. Shell Programming and Scripting

a main menu option?

I have created a main menu in the following way: while true; do echo " " echo "Main Menu: " echo "Please Select An Option Using The Options Provided." echo " " echo "1 - Search All Files" echo " " echo "2 - Search Individual Files" echo " " ... (1 Reply)
Discussion started by: amatuer_lee_3
1 Replies

Featured Tech Videos