Ajax
ASP
C,C++
C#,.NET
CSS,HTML
Delphi,Kylix
Experience
Flash
Java
JavaScript
PHP
Python
QT
SQL
ShellScript
VB
U :
P :
Register
Lost Password
Other Links
Code Archive
Save Giovanni
ShellScript Category Code
Real Name
:
SharingCode.NET User
Subject
:
shell program based on choice
Description
:
program to do the specified action based on the key code given
CHOICE VALUE OPERATION =========================== 1 DATE AND TIME 2 LIST FILES 3 USERS OF SYSTEM 4 PROCESSES OF USERS 5 QUIT ============================= clear choice=y while test [$choice=y] do echo "menu" echo "----" echo "1. Date and Time" echo "2. List of Files" echo "3. Users of System" echo "4. Processes of Users" echo "0. Quit" echo echo " Enter your option " read op case "$op" in 1) echo "Current date and time is " date;; 2) echo "List of files" ls -l;; 3) echo "users of system" who;; 4) echo "Processes of users" ps -e;; 0) exit;; *) echo "invalid option" exit;; esac echo "Do U want to continue ?" read choice done
Rating
:
0.00
(out of 5)
Visitor Voting Booth
:
Excellent
Very Good
Good
Fair
Poor
Copyright © 2006 SharingCode.NET . All rights reserved. Hosted By: SisNetworks