Sponsored Content
Full Discussion: Switch Case not working
Top Forums Shell Programming and Scripting Switch Case not working Post 302614819 by balajesuri on Wednesday 28th of March 2012 11:46:29 PM
Old 03-29-2012
Quote:
Originally Posted by Rapcher
Code:
          *)  echo "No project exists with the given project number: ${menu}"
               ;;
    esac

Try this:
Code:
         *)  echo "No project exists with the given project number: ${menu}"
             continue
               ;;
    esac

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ignore case sensitive in Case Switch

In a Case switch, how to ignore case sensitive in the test: e.g. case "$field" in "TEST) action1;; *) action2;; esac How to go in action1 in case of $field = TEST , or Test , or test or .... without enumerating all possibilities... Thanks,... (1 Reply)
Discussion started by: annelisa
1 Replies

2. UNIX for Dummies Questions & Answers

grep -A switch not working correctly with -m

egrep -A 7 -m 2 -h 'Date:|Time:' *.html this is showing only 2 line after the context of the 2nd found match. Is this a bug in grep? egrep -A 7 -m 2 -h 'Time:' *.html - this works correctly (2 Replies)
Discussion started by: zer0
2 Replies

3. Shell Programming and Scripting

Help needed in switch case handling in UNIX

Hi, In below code, i am expecting the output has Bye Bye But i am getting has Bye Hi Code: #!/usr/bin/bash var="Hi" cat txt.txt | while read var1 do next="Bye" case $var in Hi) (1 Reply)
Discussion started by: Balamani
1 Replies

4. Shell Programming and Scripting

Help needed in Switch Case

Hi Experts team, i wish to use switch case in unix. my req is case $code in 1111) echo "1111" 1112) echo "1112" *) echo "default" esac see eventhough for particular case 1111 , it is always execute the default statement *), if i code like this. How can handle... (2 Replies)
Discussion started by: spkandy
2 Replies

5. Shell Programming and Scripting

Example of switch case in Bash

can anyone post a sample code for a switch case in shell (1 Reply)
Discussion started by: sumit the cool
1 Replies

6. Shell Programming and Scripting

Something is wrong with this switch( case statement.

I started writing a script to save the files from a camera I got the other day, which mounts in /Volumes , and I got into it and started building this menu. The only problem is that the switch case is coming up as a syntax error at the parenthesis after a case. Here is the code: while : do ... (2 Replies)
Discussion started by: snakemasterAK
2 Replies

7. Shell Programming and Scripting

Error while executing switch case for find and replace specific file. Help Me...

case "$inputs" in sapte) find /pools/home_unix/sapte/work/models/model -name "*.xml" exec rm -i {} \;; ckm1) find /pools/home_unix/ckm1/work/models/model -name "*.xml" exec rm -i {} \;; I am getting error like as below. ./menu1.sh: line 144: syntax error near unexpected token `)'... (4 Replies)
Discussion started by: lathigara
4 Replies

8. Programming

Passing arguments from command line to switch case statement in C

Hi Am pretty new to C.. Am trying to pass the arguments from command line and use them in switch case statement.. i have tried the following #include <stdlib.h> main(int argc, char* argv) { int num=0; if ( argc == 2 ) num = argv; printf("%d is the num value",num); switch ( num ) ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

9. Shell Programming and Scripting

Why does it not work (Switch Case)?

Hi there, I'm trying to run a simple script,but i'm always getting this error Syntax error: word unexpected (expecting "in")I have searched many sites,like this,but i dont get it,it looks good so far,but wont work,maybe someone can help me. Here is the Script #!/bin/bash while : do... (6 Replies)
Discussion started by: JustAnUser
6 Replies
projdel(1M)						  System Administration Commands					       projdel(1M)

NAME
projdel - delete a project from the system SYNOPSIS
projdel [-f filename] project DESCRIPTION
The projdel utility deletes a project from the system and makes the appropriate changes to the system file. OPTIONS
The following options are supported: -f filename Specify the project file to modify. If no filename is specified, the system project file, /etc/project, is modified. OPERANDS
The following operands are supported: project The name of the project to be deleted. EXIT STATUS
The following exit values are returned: 0 Successful completion. 2 The command syntax was invalid. A usage message for projdel is displayed. 3 An invalid argument was provided to an option. 4 The projid given with the -p option is already in use. 5 The project files contain an error. See project(4). 6 The project to be modified, group, user, or resource does not exist. 9 The project is already in use. 10 Cannot update the /etc/project file. FILES
/etc/project System project file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ |Interface stabilty | See below. | +-----------------------------+-----------------------------+ Invocation is evolving. Human readable output is unstable. SEE ALSO
projects(1), groupadd(1M), groupdel(1M), groupmod(1M), grpck(1M), logins(1M), projadd(1M), projmod(1M), useradd(1M), userdel(1M), user- mod(1M), project(4), attributes(5) DIAGNOSTICS
In case of an error, projdel prints an error message and exits with a non-zero status. NOTES
projdel deletes a project definition only on the local system. If a network name service such as NIS or LDAP is being used to supplement the local /etc/project file with additional entries, projdel cannot change information supplied by the network name service. SunOS 5.10 4 May 2004 projdel(1M)
All times are GMT -4. The time now is 01:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy