02-01-2013
Why must you use the case construct? This smells like homework. If this were a "real world" requirement, case is not required here, an if/else would do the job.
In any case, your syntax is totally invalid.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. UNIX for Dummies Questions & Answers
It has been quite a while since I used UNIX. I am developing
a security system and I was wondering if UNIX and/or LINUX
user ID's are case-sensitive.
i.e. can user 'daveb' and 'Daveb' exist on the same system with
completely different authorizations/priorities, etc.? (3 Replies)
Discussion started by: dmilleville
3 Replies
3. UNIX for Dummies Questions & Answers
I tried looking for the answer online and came up with only a few semi-answers as to why file and directory names are case sensitive in Unix. Right off the bat, I'll say this doesn't bother me. But I run into tons of Windows and OpenVMS admins in my day job who go batty when they have to deal... (3 Replies)
Discussion started by: deckard
3 Replies
4. UNIX for Dummies Questions & Answers
Friends,
I was asked to work on Clear Case after setting up.
For this created a dynamic view by using the command, 'cleartool mkview -tag <view name> -stgloc viewstg'.
Now I am not sure how to proceed further :-( May I request you to help me out in continuing further. I have a deadline in... (1 Reply)
Discussion started by: mmohan
1 Replies
5. Shell Programming and Scripting
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Discussion started by: abhilash mn
1 Replies
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
Hi
I wanted to know if we can write a nested case in UNIX script.
Something like following -
Case ${sDB} in
Srvr1)
case ${sSchema}
Sch1)
DBusr=Username1
DBPwd=Pwd1
;;
Sch2)
DBusr=Username2
... (1 Reply)
Discussion started by: sumeet
1 Replies
8. Shell Programming and Scripting
Hi All
I have a script which extracts values from a Database (A persons name) and puts it into a variable in my script IE: $NAME
However the Value in the DB is all in uppercase and contains the users first name and last name
EG:
> echo $NAME
GRAHAM BOYLE
>
What I need is only the... (7 Replies)
Discussion started by: grahambo2005
7 Replies
9. Shell Programming and Scripting
Hi,
I am New to Unix Shell Scripting basically, i need some help in achieving a case statement in Shell script to call recursively That is if case having like 1 2 3 4 options , if user inputs 1 and gets executed case should ask for options again but user should not input the same input value 1,... (7 Replies)
Discussion started by: karthikram
7 Replies
10. Shell Programming and Scripting
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 LINUX
normality
normality(5) File Formats Manual normality(5)
NAME
normality - definition of what types of normalities different users may have.
SYNOPSIS
/etc/normality
DESCRIPTION
The normality configuration file has a rather simple syntax, as shown in the diagram in the next section. Some things to remember is that
the normality file's influence is inversely proportional to the user's cluefulness and that, in certain cirumstances, modification of the
normality file can and will be considered immoral.
NORMALITY GRAMMAR
<normality file> := <normality file> <line> |
;
<line> := <normality type> ': ' <userlist> |
<normality type> '! ' <userlist> |
<normality type> '= ' <normality tags> |
<comment>
<normality type> := [A-Z][a-zA-Z0-9]+
<userlist> := <username> ', ' <userlist> ';0 |
<username> ';0
<normality tags> := <normality tag> ', ' <normality tags> ';0 |
<normality tag> ';0
<normality tag> := 'marriage' |
'love-relation' |
'nice-job' |
'money' |
'spare-time' |
'friends' |
'no-pager' |
'vacation'
<comment> := '#' .* '0
SEMANTICS
It is expected that you specify all normality types before you start assigning (or disassigning) users to (or from) them. That is so the
system can do an easier consistency check of the specification.
Let's say that we have a system with three normality types, foo, bar and gazonk and two users, cucumber and onion.
Now, a line like "foo! onion;" would exclude onion from having any of the real-life things specified by the foo type, even if that (or
those) things appear in another normality type. So, the disallow syntax overrides the allow syntax (specified by "<type>: <username>...").
There is always an implicit type named ``all'', that contains all normality tags.
For all system administrators, you have an implicit rule, "all! asr".
EXAMPLES
# Normality file for a sad system
# Our users are onion, cucumber, jdoe, jrl and washu
animetype= love-relation, nice-job, friends, spare-time;
notworst= love-relation, nice-job, friends;
sysadm= friends;
# All normality types we will use are declared
# Now let's do the magic stuff...
all: jdoe, jrl;
animetype: washu;
sysadm: cucumber;
all! onion;
# Now, this is fairly easy, OK?
WARNINGS AND BUGS
This file messes with the real world, so a bit of caution is recommended. Newer versions of the chastise(3) library function modifies this
file on-the-fly.
Has a tendecy to create small discontinuities in the velvet of reality whenever there are syntax errors in the normality file.
AUTHOR
This sick idea was put down in *roff format by Ingvar Mattsson, as a contribution to the alt.sysadmin.recovery man page collection.
4th Berkeley Distribution Release 0.001 alpha normality(5)