12-29-2016
replace = remove? And, by what criteria?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file that contains the following:
Mon Dec 3 15:52:57 PST 2o007: FAILED TO PROCESSED FILE 200712030790881200.TXT - exit code=107
Tue Dec 4 09:08:57 PST 2007: FAILED TO PROCESSED FILE 200712030790879200a.TXT - exit code=107
This file also has a lot more stuff since it is a log file.... (2 Replies)
Discussion started by: mevasquez
2 Replies
2. Shell Programming and Scripting
Hi All,
I have a file like this,(This is a sql output file)
cat query_file
200000029
12345 10001
0.2 0
I want to fetch the values 200000029,10001,0.2 .I tried using the below code but i could get... (2 Replies)
Discussion started by: girish.raos
2 Replies
3. UNIX and Linux Applications
Hi
I have a script where the user calls it with arguments like so:
./import.sh -s DNSNAME -d DBNAME
I want to check that the database entered is valid by going through a passwd.ds file and checking if the database exists there.
If it doesn't, the I need to send a message to my log... (4 Replies)
Discussion started by: ladyAnne
4 Replies
4. Shell Programming and Scripting
Hi, all:
I would like to search all files under "./" and its subfolders recursively to find out
those files contain both word "A" and word "B", and list the filenames finally.
How to realize that?
Cheers
JIA (18 Replies)
Discussion started by: jiapei100
18 Replies
5. Shell Programming and Scripting
I have the need to search a text file from my unix script to determine if it contains the strings of: 'ERROR' and/or 'WARNING'.
By using Grep I can search the file and return a where one of these strings exists. Like this:
cat myfile.txt | grep ERROR
Output:
PROCESS ERROR HERE ... (3 Replies)
Discussion started by: buechler66
3 Replies
6. Shell Programming and Scripting
Hi
I have a file like that contains infomation about genes exons introns made as a single string. i am just planning to get the gene name alone with out any extra information.
intergenic_Nedd4_exon_0_F
Gapvd1_intron_24_R
Gapvd1_exon_25_Rmy output file should be
intergenic_Nedd4
Gapvd1... (13 Replies)
Discussion started by: raj_k
13 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I would like to change my setting in a file to the setting that user input.
For example, by default it is
ONBOOT=ON
When user key in "YES", it would be
ONBOOT=YES
--------------
This code only adds in the entire user input, but didn't replace it.
How do i go about... (5 Replies)
Discussion started by: malfolozy
5 Replies
8. Shell Programming and Scripting
Hi Guys,
I have a text where we used Ram in 10 times now I want replace all Ram words by Shyam word then how to do it. (6 Replies)
Discussion started by: aaditya321
6 Replies
9. UNIX for Advanced & Expert Users
Being new to the forum, I tried finding a solution to find files containing 2 words not necessarily on the same line.
This thread
"List all file names that contain two specific words."
answered it in part, but I was looking for a more concise solution.
Here's a one-line suggestion... (8 Replies)
Discussion started by: Symbo53
8 Replies
10. Shell Programming and Scripting
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
LEARN ABOUT OPENSOLARIS
getdev
getdev(1M) System Administration Commands getdev(1M)
NAME
getdev - lists devices based on criteria
SYNOPSIS
getdev [-ae] [criteria]... [device]...
DESCRIPTION
getdev generates a list of devices that match certain criteria. The criteria includes a list of attributes (given in expressions) and a
list of devices. If no criteria are given, all devices are included in the list.
Devices must satisfy at least one of the criteria in the list unless the -a option is used. Then, only those devices which match all of
the criteria in a list will be included.
Devices which are defined on the command line and which match the criteria are included in the generated list. However, if the -e option is
used, the list becomes a set of devices to be excluded from the list. See OPTIONS and OPERANDS.
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 devices which follows on the command line should be excluded from the list generated by this command.
Without the -e the named devices are included in the generated list. The flag has no effect if no devices are defined.
OPERANDS
The following operands are supported:
criteria Defines the criteria that a device must match to be included in the generated list. criteria is specified by expressions.
There are four possible expression types which the criteria specified in the criteria argument may follow:
attribute=value Selects all devices whose attribute attribute is defined and is equal to value.
attribute!=value Selects all devices whose attribute attribute is defined and does not equal value.
attribute:* Selects all devices which have the attribute attribute defined.
attribute!:* Selects all devices which do not have the attribute attribute defined.
See the putdev(1M) manual page for a complete listing and description of available attributes.
device Defines the devices which should be included in the generated list. This can be the pathname of the device or the device alias.
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.
2 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
devattr(1M), getdgrp(1M), putdev(1M), putdgrp(1M), attributes(5)
SunOS 5.11 5 Jul 1990 getdev(1M)