@ balajesuri:
It doesn't work properly.
It returns only the entire first matching line, and add a 4th field with the match from file2.tab only
output.tab: ---------- Post updated at 07:45 PM ---------- Previous update was at 06:46 PM ----------
@ Peasant
It almost works.
It has to return lines with matches from the 2 files or nothing (if it finds names from 1 of the 2 files only, it should return nothing)
A real example. bigdb.tab: file1.tab: file2.tab:
Wanted output.tab:
Hi,
I have a log file which might have certain paragraphs.
Switch not possible Error code 1234
Process number 678
Log not available Error code 567
Process number 874
.....
......
......
Now I create an exception file like this.
cat text.exp
Error code 1234
Process number 874 (7 Replies)
In a directory, there are two different file extensions (*.txt and *.xyz) having similar names of numerical strings (*). The (*.txt) contains 5000 multiple files and the (*.xyz) also contains 5000 multiple files. Each of the files has around 4000 rows and 8 columns, with several unique string... (5 Replies)
I have a file name in $f. If $f has "-" at the beginning, or "=", or does not have extension ".ry" or ".xt" or ".dat" then cerr would not be empty.
Tried the following but having some problems.
set cerr = `echo $f | awk '/^-|=|!.ry|!.xt|!.dat/'` (4 Replies)
Hi Guys,
I have file like below, I want to print all lines between test1231233 to its 10 occurrence(till line 41)
test1231233
qwe
qwe
qweq123
test1231233
qwe
qwe
qweq23
test1231233
qwe
qwe
qweq123
test1231233
qwe
qwe
qweq123131 (3 Replies)
Hi,
I need to find records with a search string from a file. Search strings are provided in a file.
For eg. search_String.txt file is like below
chicago
mexico
newark
sanhose
and the file from where the records need to be fetched is given below
src_file:... (1 Reply)
Hi,
I wasn't quite sure how to title this one! Here goes:
I have some already partially parsed log files, which I now need to extract info from. Because of the way they are originally and the fact they have been partially processed already, I can't make any assumptions on the number of... (8 Replies)
Hi,
I have requirement to find the matching patterns of two files in Unix. One file is the log file and the other is the error list file. If any pattern in the log file matches the list of errors in the error list file, then I would need to find the counts of the match.
For example,
... (5 Replies)
Delete patterns matching
OS version: RHEL 7.3
Shell : Bash
I have a file like below (pattern.txt). I need to delete all lines starting with the following words (words separated by comma below) and ) character.
LOGGING, NOCOMPRESS, TABLESPACE , PCTFREE, INITRANS, MAXTRANS, STORAGE,... (3 Replies)
i have a file where the hostnames and variables are in same line in below format, am able extract some part variables while otherlike subscriptions and handler is missing.
can you please correct me if grep is able to perform this ?
cat /tmp/test
localhost subscriptions='' handler="genie"... (14 Replies)
Discussion started by: rakeshkumar
14 Replies
LEARN ABOUT SUNOS
dminfo
dminfo(1M) System Administration Commands dminfo(1M)NAME
dminfo - report information about a device entry in a device maps file
SYNOPSIS
dminfo [-v] [-a] [-f pathname]
dminfo [-v] [-a] [-f pathname] -n dev -name...
dminfo [-v] [-a] [-f pathname] -d dev -path...
dminfo [-v] [-a] [-f pathname] -t dev -type...
dminfo [-v] [-f pathname] -u dm -entry
DESCRIPTION
dminfo reports and updates information about the device_maps(4) file.
OPTIONS
The following options are supported
-a Succeed if any of the requested entries are found. If used with -v, all entries that match the requested case(s)
are printed.
-d dev-path Search by dev-path. Search device_maps(4) for a device special pathname in the device_list field matching the
dev-path argument. This option cannot be used with -n, -t or -u.
-f pathname Use a device_maps file with pathname instead of /etc/security/device_maps.
-n dev-name Search by dev-name. Search device_maps(4) for a device_name field matching dev-name. This option cannot be used
with -d, -t or -u.
-t dev-type Search by dev-type. Search device_maps(4) for a device_type field matching the given dev-type. This option cannot
be used with -d, -n or -u.
-u dm-entry Update the device_maps(4) file. This option is provided to add entries to the device_maps(4) file. The dm-entry
must be a complete device_maps(4) file entry. The dm-entry has fields, as in the device_maps file. It uses the
colon (:) as a field separator, and white space as the device_list subfield separators. The dm-entry is not made if
any fields are missing, or if the dm-entry would be a duplicate. The default device maps file can be updated only
by the super user.
-v Verbose. Print the requested entry or entries, one line per entry, on the standard output. If no entries are speci-
fied, all are printed.
EXIT STATUS
0 Successful completion.
1 Request failed.
2 Incorrect syntax.
FILES
/etc/security/device_maps
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO bsmconv(1M), device_maps(4), attributes(5)NOTES
The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for
more information.
SunOS 5.10 6 May 1993 dminfo(1M)