09-03-2008
I'm trying to understand the modification of the
${group%:*}
to reverse it so i only the the ID portion of the select instead of the group name.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is it possible to change the color of text in a korn shell script Menu?
I can change the color of session text through my telnet client but I want to be able to change color text in the Korn shell menu to highlight certain items. (6 Replies)
Discussion started by: darthur
6 Replies
2. Programming
If we want to determine that amongst many descriptors which one is set ready for reading , ready for writing or has an error condition pending we use the select () utility.I would like to know can we have some technique by which we will be able to determine which amongst many IPC ids is ready for... (0 Replies)
Discussion started by: S.P.Prasad
0 Replies
3. Shell Programming and Scripting
I have a ksh script that is a login menu for my end users. I would like to have one line of the welcome message flash when there is a system notice about an impending outage.
The welcome message is a series of echo statements which prints a text file "msg of the day" with the status msg.
I tried... (1 Reply)
Discussion started by: MizzGail
1 Replies
4. Shell Programming and Scripting
Hi All,
Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies
5. Shell Programming and Scripting
hi, when i type in a value higher than 20 it will show me the validation but if i put a negative figure it just goes goes blank where i just keep typing and nothing happens so i had to control c to exit out the process, can someone help me please.
clear
read -p "please enter... (2 Replies)
Discussion started by: bassmasta1
2 Replies
6. Shell Programming and Scripting
Hopefully I'm in the right place. Im new to the forums and linux!
I'm looking to add a menu to my perl hangman game i have created. The menu will use user input for the desired option and then perform the operation indicated. I would like something along the lines of:
Welcome to Hangman... (1 Reply)
Discussion started by: jahburmski
1 Replies
7. Shell Programming and Scripting
Hello,
I want to design a script that will call an existing menu script and select options one by one and redirict the out put to a file.
For example;-
In the script MENU.sh there are 10 options i want to design a script MENU2.sh that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Discussion started by: spradha
4 Replies
8. Shell Programming and Scripting
Hi everyone,
Here are the contents of a plain text file created by a SQL query:
SUM(T.TRNQTY) COUNT(D.TRNSEQ)
---------------- ----------------
1380 46
1393 59
2680 134
740 37
... (5 Replies)
Discussion started by: gacanepa
5 Replies
9. Programming
I have a string
opt="row234"
I want to put "row" in a string and 234 in an int.
In general it should be
opt="textnum"
I want to store text in a string and num in an int. (6 Replies)
Discussion started by: kristinu
6 Replies
10. Programming
Hello,
I am starting up a tool and one of the initial steps is to select a site/location which is being read from a text file.
Here is the text file contents:
site1
site2
site3
Here is the code:
#!/usr/bin/python
from Tkinter import * (3 Replies)
Discussion started by: tattoostreet
3 Replies
LEARN ABOUT SUNOS
putdgrp
putdgrp(1M) System Administration Commands putdgrp(1M)
NAME
putdgrp - edits device group table
SYNOPSIS
putdgrp [-d] dgroup [device...]
DESCRIPTION
putdgrp modifies the device group table. It performs two kinds of modification. It can modify the table by creating a new device group or
removing a device group. It can also change group definitions by adding or removing a device from the group definition.
When the command is invoked with only a dgroup specification, the command adds the specified group name to the device group table if it
does not already exist. If the -d option is also used with only the dgroup specification, the command deletes the group from the table.
When the command is invoked with both a dgroup and a device specification, it adds the given device name(s) to the group definition. When
invoked with both arguments and the -d option, the command deletes the device name(s) from the group definition.
When the command is invoked with both a dgroup and a device specification and the device group does not exist, it creates the group and
adds the specified devices to that new group.
OPTIONS
The following options are supported:
-d Delete the group or, if used with device, delete the device from a group definition.
OPERANDS
The following operands are supported:
dgroup Specify a device group name.
device Specify the pathname or alias of the device that is to be added to, or deleted from, the device group.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 Command syntax was incorrect, an invalid option was used, or an internal error occurred.
2 Device group table could not be opened for reading or a new device group table could not be created.
3 If executed with the -d option, indicates that an entry in the device group table for the device group dgroup does not exist and
so cannot be deleted. Otherwise, indicates that the device group dgroup already exists and cannot be added.
4 If executed with the -d option, indicates that the device group dgroup does not have as members one or more of the specified
devices. Otherwise, indicates that the device group dgroup already has one or more of the specified devices as members.
EXAMPLES
Example 1: Adding a new device group.
The following example adds a new device group:
example# putdgrp floppies
Example 2: Adding a device to a device group.
The following example adds a device to a device group:
example# putdgrp floppies diskette2
Example 3: Deleting a device group.
The following example deletes a device group:
example# putdgrp -d floppies
Example 4: Deleting a device from a device group.
The following example deletes a device from a device group:
example# putdgrp -d floppies diskette2
FILES
/etc/dgroup.tab
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
listdgrp(1M), putdev(1M), attributes(5)
SunOS 5.10 5 Jul 1990 putdgrp(1M)