Exiting the script if the character is not recognized
Below is the script that i'm using but i'm getting an error,
if the character entered is not equal to a or b or c, the script should exit with the message displayed on the screen.
Any help will be appreciated.
Thanks
Last edited by Franklin52; 04-11-2014 at 03:36 AM..
Reason: Please use code tags
there are many script in my project.i am having a problem when i am trying to quit from child script.what is the command to wrap up all the parent script and calling script as well? exit 0 is not working.please help.... (1 Reply)
I have a script which has the following statement,
/opt/oracle/product/9i/bin/sqlplus << EOC >> $LOG_FILE 2>&1
username/password ---- Enters the SQL prompt
@/export/home/oracle/shells/grant_userview.sql ---Runs the SQL script
@/export/home/oracle/shells/grant_proc_userview.sql ---Runs the... (6 Replies)
Hi,
I am trying to exit the script from a function.
I was in assumption that if we use exit ( inside or outside the function) it will exit from the script.
alternatively, return will exit from that particular function.
but in my case, exit is exiting from the function and not the script.... (8 Replies)
I have a script planned for the Helpdesk to allow them to (on a couple of RHEL 3 / RHEL 5 servers) reset passwords, stop / start printers, and clear print queues. The appropriate sudo permissions were given to their accounts, and the individual functions all work just fine. The ability to move... (0 Replies)
I have to write a script in ksh which again should call another script. Say A.ksh is calling B.ksh. Now in B.ksh if the condition we are checking for is true then we have to go back to the main script A.ksh or if the condition in B.ksh is false then we have to totally come out of the scripts.
I... (1 Reply)
What would cause a script to work under one user account and not another? Here's an example of what I'm referring to.
Here's a simple script. Let's put it in a file called “thescript”.
#! /bin/bash
alias a='echo hello world'
a
Here are the results when this script is executed logged in... (3 Replies)
Hi Team,
Need your help for the below code snippet. I wrote a module to read the file names remote server using file name convention.
Issue : My script is coming out from while loop without reading complete file.
test1()
{
while read line
do
echo $line
file_nm_convention=`echo... (3 Replies)
HI Team -
I'm running into a weird issue when trying to call a .ksh script.
In my shell script, I'm using the following command to call my environment file:
cd /hypbin/test
./_env.ksh
But it's saying not found. Permissions are set correctly, shebang is set but I'm unsure why it's not... (5 Replies)
Discussion started by: SIMMS7400
5 Replies
LEARN ABOUT MOJAVE
towupper
TOWUPPER(3) BSD Library Functions Manual TOWUPPER(3)NAME
towupper, towupper_l -- lower case to upper case letter conversion (wide character version)
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <wctype.h>
wint_t
towupper(wint_t wc);
#include <wctype.h>
#include <xlocale.h>
wint_t
towupper_l(wint_t wc, locale_t loc);
DESCRIPTION
The towupper() function converts a lower-case letter to the corresponding upper-case letter.
Although the towupper() function uses the current locale, the towupper_l() function may be passed a locale directly. See xlocale(3) for more
information.
RETURN VALUES
If the argument is a lower-case letter, the towupper() function returns the corresponding upper-case letter if there is one; otherwise, the
argument is returned unchanged.
SEE ALSO iswupper(3), toupper(3), towlower(3), wctrans(3), xlocale(3)STANDARDS
The towupper() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
BSD October 3, 2002 BSD