09-17-2007
case label
If I use "?" as a case label, what does it mean?
For Example:
case $choice in
1)
.....;;
2)
.....;;
?)
.....;;
esac
Here what does "?" in case label mean?
9 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. Shell Programming and Scripting
Given the following code
#!/usr/bin/perl -w
use IO::Socket;
my($handle, $line, $kidpid);
$handle = IO::Socket::INET->new(
PeerAddr =>"64.22.229.139",
PeerPort =>"4321",
Proto=>"tcp",
... (0 Replies)
Discussion started by: frequency8
0 Replies
3. 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
4. Shell Programming and Scripting
echo "please enter ur choice..
1. Make a file.
2. Display contents
3. Copy the file
4. Rename the file
5. Delete the file
6. Exit"
read choice
case $choice in
1 ) echo enter the file name
read fname
if
then
echo... (2 Replies)
Discussion started by: gotam
2 Replies
5. Shell Programming and Scripting
Hey all,
I'm running a BASH shell and I was wondering if anyone knows a code to rename all the files in a directory. All I need to do is change the first character in the file from uppercase to lowercase and some of the files are already lowercase so they don't need to change.
-Thanks (4 Replies)
Discussion started by: jjzieve
4 Replies
6. Shell Programming and Scripting
is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be
CASE $vendor OR $alias
condition 1) statements;
condition 2) statements;
etc.
esac
but I keep... (25 Replies)
Discussion started by: Straitsfan
25 Replies
7. Shell Programming and Scripting
Hello All,
I have code as follows :-
while true do
{opening a case1 statement}
1)
{opening another case2 statement}
{closing case 2}
2)
Showing error for "2)" as Syntax error at line 59 : `)' is not expected.
*)
{closing case 1}
... (5 Replies)
Discussion started by: Renjesh
5 Replies
8. Shell Programming and Scripting
Hi all,
I am attempting to create a shell script to optimize some routine process.
I want this script can let user select the actions they want to do.
But I met a problem that my script can only read one input and then do one action.
Is it possible to let my script to run more than one... (2 Replies)
Discussion started by: kaiya
2 Replies
9. Programming
Why, here the size of class 'Derived' is 8 ?
class Base1
{
public:
virtual void f() { }
};
class Base2
{
public:
virtual void f() { }
};
class Derived : public Base1, Base2
{
public:
virtual void f() { }
}; (1 Reply)
Discussion started by: techmonk
1 Replies
LEARN ABOUT OPENSOLARIS
getvol
getvol(1M) System Administration Commands getvol(1M)
NAME
getvol - verifies device accessibility
SYNOPSIS
/usr/bin/getvol -n [-l label] device
/usr/bin/getvol [-f | -F] [-ow] [-l label | -x label] device
DESCRIPTION
getvol verifies that the specified device is accessible and that a volume of the appropriate medium has been inserted. The command is
interactive and displays instructional prompts, describes errors, and shows required label information.
OPTIONS
The following options are supported:
-n Runs the command in non-interactive mode. The volume is assumed to be inserted upon command invocation.
-l label Specifies that the label label must exist on the inserted volume (can be overridden by the -o option).
-f Formats the volume after insertion, using the format command defined for this device in the device table.
-F Formats the volume after insertion and places a file system on the device. Also uses the format command defined for this device
in the device table.
-o Allows the administrator to override a label check.
-w Allows administrator to write a new label on the device. User is prompted to supply the label text. This option is ineffective
if the -n option is enabled.
-x label Specifies that the label label must exist on the device. This option should be used in place of the -l option when the label
can only be verified by visual means. Use of the option causes a message to be displayed asking the administrator to visually
verify that the label is indeed label.
OPERANDS
The following operands are supported:
device Specifies the device to be verified for accessibility.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 Command syntax was incorrect, invalid option was used, or an internal error occurred.
3 Device table could not be opened for reading.
FILES
/etc/device.tab
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
NOTES
This command uses the device table to determine the characteristics of the device when performing the volume label checking.
SunOS 5.11 5 Jul 1990 getvol(1M)