03-18-2009
Thanks ! I tried to something but it's still not working, still getting Command not found error:
#!bin/csh
# This menu will allow user to select from a menu of options, and then perform the
# selected command. User can use options until he chooses to exit
while :
do
clear
echo ***** Select from menu *****
echo "[1] List all files in the current directory"
echo "[2] Display today's date and time"
echo "[3] Display whether a file is just a file, or if it is a directory"
echo "[4] Create a back up file"
echo "[5] Exit the menu"
echo -n "Select your choice {1-5}:"
read yourch
case $yourch in
1) echo "These are your files: "; ls -l; echo "Press Enter"; read;;
2) echo "Today is 'date', time is 'time'; echo "Press Enter"; read;;
3) echo "Is the file a file or a directory?"; -a $1; echo "File is a file, not a directory"; read;;
4) echo "Create a backfile"; mv $; echo "Press Enter"; read;;
5) exit 0 ;;
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello all
im trying to use in sun Solaris the information received from the top command
now i several machines that dont have install the top program so when im running the script im geting error
saying after im running this code :
set MemoryInfo = `top | grep Memory`
if (... (2 Replies)
Discussion started by: umen
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,All
I wrote below script(Example1.sh) and i ran but it giveing error. it's excuted yesterday.
SYSTEM_TIME=`date '+%H:%M:%S'`
CMP_LOG_TIME=`head -1 runcmp-HINET.log`
CMP_ENDED1=`grep 'HINET CMP ended' runcmp-HINET.log`
CMP_ENDED2=`echo "HINET CMP ended"`
CMP_FAILED2=`echo "HINET... (2 Replies)
Discussion started by: koti_rama
2 Replies
3. Shell Programming and Scripting
Hi,All
I wrote below script(Example1.sh) and i ran but i got error. it's excuted yesterday.
SYSTEM_TIME=`date '+%H:%M:%S'`
CMP_LOG_TIME=`head -1 runcmp-HINET.log`
CMP_ENDED1=`grep 'HINET CMP ended' runcmp-HINET.log`
CMP_ENDED2=`echo "HINET CMP ended"`
CMP_FAILED2=`echo "HINET CMP... (2 Replies)
Discussion started by: koti_rama
2 Replies
4. Shell Programming and Scripting
The purpose of those comands are to find the newest file in a directory acvrdind to system date, and it has to be recursively found in each directory.
The problem is that i want to list in a long format every found file, but the commands i use produce unexpected results ,so the output lists in a... (5 Replies)
Discussion started by: alexcol
5 Replies
5. UNIX for Dummies Questions & Answers
Hi again
I have the follwing - cat ~/ABCFILE | grep "$SYSTEM" | grep "$USERNAME"
What I'm looking to do is have the variable for $SYSTEM determined by the user making a selection from a numbered list. So, input 1 would be system ABC etc.
I'm very puzzled as to how to go about this?
Any... (3 Replies)
Discussion started by: Great Uncle Kip
3 Replies
6. Shell Programming and Scripting
when the file is not found i want it to return to the menu, however it carries out the next line when i hit a key
I know its probably something simple can anyone help?
here is my pause function:
function pause(){
read -s -n 1 -p "Press any key to return to Menu . . ."
echo
}
SCRIPT... (2 Replies)
Discussion started by: Alendrin
2 Replies
7. UNIX for Dummies Questions & Answers
I get a "command not found" error when I run the csh command. I also get this error when I start a new session since my default shell is c shell. Any pointers as to what is going on?
I am trying to set some paths using the .cshrc file and need to use the csh command for this.
Thanks. (1 Reply)
Discussion started by: kannyg
1 Replies
8. Shell Programming and Scripting
I am trying to find the number of files whose name starts with uni.
Below is the code but it is giving error. :confused:
#!/bin/csh
FILES_NAME ='files_list';
FILE_NAME_PATTERN = 'uni*';
NO_OF_FILES;
ls -l $FILE_NAME_PATTERN > $FILES_NAME ;
NO_OF_FILES = `wc -l $FILES_NAME`;
echo... (3 Replies)
Discussion started by: hiten.r.chauhan
3 Replies
9. Shell Programming and Scripting
hi all i am a newbie to this
is there any examples on creating a main menu with 3 sub menu
main menu -> option a , b and c
a menu -> option 1 ,2 and 3
b menu -> option 1 ,2
c menu -> option 1 ,2
i am getting headache as my code kept getting unexpected EOF
---------- Post... (0 Replies)
Discussion started by: chercm
0 Replies
LEARN ABOUT OSF1
sysman_menu
sysman_menu(8) System Manager's Manual sysman_menu(8)
NAME
sysman_menu - Graphical interface to run system management tasks
SYNOPSIS
/usr/sbin/sysman [-ui cui | gui] [-display displayname] [-menu]
/usr/sbin/sysman [-accel] <accelerator> [arguments]
/usr/sbin/sysman [-menu] <name> [arguments]
/usr/sbin/sysman [-menu] -list
/usr/sbin/sysman [-menu] -help | -h
/usr/sbin/sysman -focus hostname
OPTIONS
Specifies the user interface to be invoked. The choices are: Specifies command line interface. Specifies graphical user interface. Speci-
fies the display screen on where sysman_menu displays its window. If the display option is not specified, sysman_menu uses the display
screen specified by your DISPLAY environment variable. The display option has the format hostname:server.number. The default is :0.0. For
more information, see the X(1X) reference page. In a TruCluster environment, some management tasks effect the cluster as a whole and some
are local to a specific cluster member. If a task requires focus, the "Choose a host to manage" dialog box will be displayed. To launch
the task directly, bypassing this dialog box, you can specify the -focus option. Directly invokes the task with that accelerator. Any
arguments are passed on to the task itself. Use sysman -list for a list of the accelerators.
If the accelerator is for a branch of the menu and not an executable task, then the menu hierarchy is expanded to display the con-
tents of the specified branch. Same as -accel option but the name of the task as displayed in the SysMan Menu is specified. For
example, sysman -menu "Manage local users". Any arguments are passed on to the task itself.
The name is for a branch of the menu and not an executable task, then the menu hierarchy is expanded to display the contents of the
specified branch. Displays a list of all the tasks that can be run from the SysMan Menu and their accelerators. Displays help for
the SysMan Menu.
DESCRIPTION
SysMan Menu is used by the system administrator to obtain system management data and run selected system management tasks. SysMan Menu pro-
vides a menu of system management tasks in a tree type display, with branches of management categories and leaves of actual tasks. Select-
ing a leaf or tasks invokes a task, which displays a dialog for performing the task.
SysMan Menu and its associated tasks can be run on an X Windows display, a terminal with curses capability, locally on a PC, or from a Web
browser. For detailed information in running SysMan Menu from a PC or a Web browser, please use your Web browser and go to:
http://your_machine_name:2301/SYSMAN/index.html.
Online help is available for the SysMan Menu. To get help, select the Help button.
RESTRICTIONS
You must have root privileges to perform most tasks with this application. You can grant root privileges for specific users or groups of
users using the Division of Privileges (DOP) application. See the dop(8) reference page and the online help in the sysman dopconfig appli-
cation for additional information.
You must have the root privileges to execute some of the tasks on the SysMan Menu.
EXAMPLES
The following example shows how to launch the Manage local users task from the command line using an accelerator name: sysman -accel users
The following example shows how to invoke SysMan Menu in curses mode: sysman -ui cui The following example shows how to get a listing of
tasks and their accelerators: sysman -list The following example, displays the status of the NFS related daemons on a remote cluster mem-
ber: sysman -focus nfs_config_status
SEE ALSO
Commands: sysman_station(8), sysman_cli(8), sysman_clone(8), sysman(8)
System Administration
http://your_machine_name:2301/SYSMAN/index.html
sysman_menu(8)