Hi,
I'm trying to write a shell script that has a menu and then dependant on the selection, will automate some samba file transfer.
The problem is when I run the code without the case statement it runs fine. but when I put the case statement in the only way I can get the code to run is to... (6 Replies)
I need to display this menu and accept variables. Can someone tell me why i am having a problem with this case statement, please
# TAPE MANAGER MAIN MENU
tapemgr_Main_Menu()
{
echo "Legato Tape Management System Menu"
echo " This system is used to report Legato ERV Offsite and Tapes... (6 Replies)
Hi Buddies,
The following is shell scripts which was borrowed from linux box for load average check. it runs good.
(this structure is simple, when load average is too high, it will send alert to user)
#!/usr/bin/ksh
# Set threshold for 1, 5 and 15 minture load avarage
# configured for... (4 Replies)
In a case statement like below :
case $rental in
"car") echo "For $rental Rs.20 per k/m";;
"van") echo "For $rental Rs.10 per k/m";;
"jeep") echo "For $rental Rs.5 per k/m";;
"bicycle") echo "For $rental 20 paisa per k/m";;
*) echo "Sorry, I can not gat a $rental for you";;... (4 Replies)
Hi,
I need modify the all lines in a file into one format.
cat file
htec.twe34c.ATI
.hesh.twdghu..ATI
..hesh.twdghu..ATI
htec.twe3
hjsct14567ati
Output should have 16 characters
htectwe34c ATI
heshtwdghu ATI
heshtwdghu ATI
htectwe3 ATI
hjsct14567 ATI (4 Replies)
Guys,
Here is the script syntax which is not accepting the parameters & not performing the said activity.
$ ./routing.sh xyz123-ra str enable
**********************************************************************
Preparing to service the request for Device xyz123-ra in Question... (9 Replies)
Hi,
When I execute the below script, I am getting the error as
' is not expected.ror at line 3 : `in
#!/bin/sh
case $1 in
-r) echo Force deletion without confirmation ;;
-i) echo Confirm before deleting ;;
*) echo Unknown argument ;;
esac
I could not see any problem with... (1 Reply)
I am new in shell script.I want to write a shell script to read username and password from file and compare it with the username and password which is entered by the GUI application. (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a phonebook program.
It should use functions to perform the required tasks. It should be menu-based,... (1 Reply)
have written the below code to check whether the string received from user is a file name or dir using case statement, but its going into default case*).
#!/bin/sh
#Get a string from user and check whether its a existing filename or not
rm str2
rm str3
echo "enter a file \c"
read fil... (8 Replies)
Discussion started by: Mohan0509
8 Replies
LEARN ABOUT SUNOS
noecho
echo(3XCURSES) X/Open Curses Library Functions echo(3XCURSES)NAME
echo, noecho - enable/disable terminal echo
SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib
-R /usr/xpg4/lib -lcurses [ library... ]
c89 [ flag... ] file... -lcurses [ library... ]
#include <curses.h>
int echo(void);
int noecho(void);
DESCRIPTION
The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially,
curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. The echo() and noecho() functions control soft-
ware echo only. Hardware echo must remain disabled for the duration of the application, else the behavior is undefined.
RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO getch(3XCURSES), getstr(3XCURSES), initscr(3XCURSES), libcurses(3XCURSES), scanw(3XCURSES), attributes(5), standards(5)SunOS 5.10 5 Jun 2002 echo(3XCURSES)