I guess my lack of scripting combined with my flu are making me dizzy. If I add a line to the menu, such that is says input here your search criteria. How then do I pass it to the read?
echo " 6) Input your search criteria here"
6) echo "read"
;;
Hi,
I am writing a shell (after 6-7 months)that has to receive text from another shell, check if the first line in the text has a key word and then execute different shell.I could come up with the below program structure, please suggest me if there is a better way to do it or please help me with... (14 Replies)
Hi,
Now i work in a code that
1-get data stored in the database in the form of hash table with a key
field which is the " Name"
2-in the same time i open a txt file and loop through it word by word
3- which i have a problem in is that :
I need to loop word by word and check if it is a... (0 Replies)
Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name".
Thanks for the reply in adv,:) (3 Replies)
Hi
I've one file full of paths of certain files and I want to add some extra file words in front of all the paths. for eg:
i have a file name test.txt which show some details only..
024_hd/044/0344eng.txt
035_bv/222/editor.jpg
here I want to add /usr/people/indiana/ infront of all the... (4 Replies)
I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word description excluding weird characters like $$#$#@$#@***$# and without html tags in the new file output.txt. Help me. Thanx in advance.
My final goal is to... (11 Replies)
I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word "description" excluding weird characters like $&lmp and without html tags in the new file output.txt. Help me. Thanx in advance. I have attached the input... (4 Replies)
Hi All,
I have a XML file which is looks like as below. <<please see the attachment >>
<?xml version="1.0" encoding="UTF-8"?>
<esites>
<esite>
<name>XXX.com</name>
<storeId>10001</storeId>
<module>
... (4 Replies)
Hy there all. Im new here. Olso new to terminal & bash, but it seams that for me it's much easyer to undarsatnd scripts than an actual programming language as c or anyother languare for that matter.
S-o here is one og my home works s-o to speak.
Write a shell script which:
-only works as a... (1 Reply)
Discussion started by: Crisso2Face
1 Replies
LEARN ABOUT SUNOS
getdgrp
getdgrp(1M) System Administration Commands getdgrp(1M)NAME
getdgrp - lists device groups which contain devices that match criteria
SYNOPSIS
/usr/sbin/getdgrp [-ael] [criteria...] [dgroup...]
DESCRIPTION
getdgrp generates a list of device groups that contain devices matching the given criteria. The criteria is given in the form of expres-
sions.
OPTIONS
The following options are supported:
-a Specifies that a device must match all criteria to be included in the list generated by this command. The option has no effect if
no criteria are defined.
-e Specifies that the list of device groups on the command line should be excluded from the list generated by this command. Without
the -e option the named device groups are included in the generated list. The flag has no effect if no devices are defined.
-l Specifies that all device groups (subject to the -e option and the dgroup list) should be listed even if they contain no valid
device members. This option has no affect if criteria is specified on the command line.
OPERANDS
The following operands are supported:
criteria Defines criteria that a device must match before a device group to which it belongs can be included in the generated list.
Specify criteria as an expression or a list of expressions which a device must meet for its group to be included in the
list generated by getdgrp. If no criteria are given, all device groups are included in the list.
Devices must satisfy at least one of the criteria in the list. However, the -a option can be used to define that a "logi-
cal and" operation should be performed. Then, only those groups containing devices which match all of the criteria in a
list will be included.
There are four possible expressions types which the criteria specified in the criteria argument may follow:
attribute=value Selects all device groups with a member whose attribute attribute is defined and is equal to
value.
attribute!=value Selects all device groups with a member whose attribute attribute is defined and does not equal
value.
attribute:* Selects all device groups with a member which has the attribute attribute defined.
attribute!:* Selects all device groups with a member which does not have the attribute attribute defined.
See putdev(1M) for a complete listing and description of available attributes.
dgroup Defines a set of device groups which should be included in or excluded from the generated list. Device groups that are
defined and which contain devices matching the criteria are included.
If the -e option is used, this list defines a set of device groups to be excluded. When the -e option is used and crite-
ria is also defined, the generated list will include device groups containing devices which match the criteria and are not
in the command line list.
EXIT STATUS
The following exit values are returned:
0 Successful completion of the task.
1 Command syntax was incorrect, invalid option was used, or an internal error occurred.
2 Device table or device group table could not be opened for reading.
FILES
/etc/device.tab
/etc/dgroup.tab
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO devattr(1M), getdev(1M), putdev(1M), putdgrp(1M), attributes(5)SunOS 5.10 5 Jul 1990 getdgrp(1M)