09-21-2011
Compare two files in different formats and get output
File A:
HTML Code:
DATAFILE TABLESPACE
------------------------- -------------------------
/dev/rprod_0032_011 D_EEM
/dev/rprod_0032_012 D_ESO_REF
/dev/rprod_0032_013 D_FLEXTOOL
/dev/rprod_0032_014 D_I18N
/dev/rprod_0032_015 D_IQHEALTH
/dev/rprod_0032_016 D_IQHOLAP
/dev/rprod_0032_017 D_MAT_MGT_1
/dev/rprod_0032_018 D_MAT_MGT_2
/dev/rprod_0032_019 D_MEDNET
/dev/rprod_0032_020 D_MICRO
/dev/rprod_0032_021 D_MMC
DATAFILE TABLESPACE
------------------------- -------------------------
/dev/rprod_0032_022 D_MMR
/dev/rprod_0032_023 D_MRNET
/dev/rprod_0032_024 D_OMF
/dev/rprod_0032_025 D_OMF_BATCH
/dev/rprod_0032_026 D_OMF_RAD
/dev/rprod_0032_027 D_OMF_SM
......
File B:
HTML Code:
/dev/rprod_0032_000 | 32
/dev/rprod_0032_001 | 32
/dev/rprod_0032_002 | 32
/dev/rprod_0032_003 | 32
/dev/rprod_0032_004 | 32
/dev/rprod_0032_005 | 32
/dev/rprod_0032_006 | 32
/dev/rprod_0032_007 | 32
/dev/rprod_0032_008 | 32
/dev/rprod_0032_009 | 32
/dev/rprod_0032_010 | 32
/dev/rprod_0032_011 | 32
.....
I have two files to be compared to get the output of the differences.
File A has the additional headings and spaces, but File B has no headings and spaces.
File B has a lot more lists than File A. I need to know what datafiles (beginning with /dev/r*) of File B are not in File A.
Please advise.
Thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a question of comparing to files and output
the result third file where file1 is the mainfile containing processed dir data
and 2nd file grepīs dirīs data again (could be newer dirs comparing file1<file2)
now i wanna make shure that output in file3 only contains newer dirs
hx... (1 Reply)
Discussion started by: needle
1 Replies
2. Shell Programming and Scripting
I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together.
I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
Discussion started by: bkeep
4 Replies
3. Shell Programming and Scripting
Hi,
I have two files, file1 and file2 and I need to compare them by line (exact match, order of the lines is not important) and get output with lines from file2 that are not found in file1 (not other way around).
How do I do that? With grep or otherwise..
Thankyou (2 Replies)
Discussion started by: orp56
2 Replies
4. Shell Programming and Scripting
I know the diff does this but it does output more info than just the different text
(e.g.
$ diff file1 file2
29a30
> /home/alex/Pictures/hello.jpg
1694a1696
> /home/alex/Pictures/hi.jpg
)
How can I make it output only
/home/alex/Pictures/hello.jpg
/home/alex/Pictures/hi.jpg
?
thank... (2 Replies)
Discussion started by: hakermania
2 Replies
5. Shell Programming and Scripting
I have two files '
1st one
ALIC-000352-B
ALIC-000916-O
DDS-STNGD
FDH-PPO1-001
PFG-30601-001
2nd one
'ALIC-000352-B'
'ALIC-000916-O'
'DDS-STNGD'
'FDH-PPO1-001' (4 Replies)
Discussion started by: Pratik4891
4 Replies
6. Shell Programming and Scripting
// AIX 5.3 & 6.1
This command
powermt display dev=all
returns the output of
Pseudo name=hdiskpower50
Symmetrix ID=000190101757
Logical device ID=05F0
state=alive; policy=SymmOpt; priority=0; queued-IOs=0
==============================================================================... (2 Replies)
Discussion started by: Daniel Gate
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Please help How to compare two files-
Any mismatches 2nd and 3rd column's values corresponding to 1st column.
file1
15294024|Not Allowed|null
15291398|Not Allowed|null
15303292|Dropship (standard)|N
15303291|Dropship (standard)|N
15275561|Store Only|Y
15275560|Store Only|Y... (2 Replies)
Discussion started by: Ankita Talukdar
2 Replies
8. UNIX for Dummies Questions & Answers
Hi
Please help me to compare two files and output into a new file
file1.txt
15114933 |4001
15291649 |933502
15764675 |4316
15764678 |4316
15761974 |282501
15673104 |933505
15673577 |933505
15673098 |933505
15673096 |933505
15673092 |933505
15760705 ... (13 Replies)
Discussion started by: Ankita Talukdar
13 Replies
9. Shell Programming and Scripting
Hi,
I have a log file that records date time stamp in this format <Jun 7, 2015 12:56:54 PM EDT>.
The date command give me the date in this format Mon Jun 8 08:40:58 EDT 2015
If the difference in the timestamp in the logfile & the current System datetime stamp is less than 15 mins then... (4 Replies)
Discussion started by: shifahim
4 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
i am trying to compare two files in Centos 6.
F1: /tmp/d21
NAME="xvda" TYPE="disk" SIZE="40G" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT=""
NAME="xvda1" TYPE="part" SIZE="500M" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT="/boot"
NAME="xvda2" TYPE="part"... (2 Replies)
Discussion started by: balu1234
2 Replies
LEARN ABOUT OSX
mkdevmaps
mkdevmaps(1M) System Administration Commands mkdevmaps(1M)
NAME
mkdevmaps - make device_maps entries
SYNOPSIS
/usr/sbin/mkdevmaps
DESCRIPTION
The mkdevmaps command writes to standard out a set of device_maps(4) entries describing the system's frame buffer, audio, and removable
media devices.
The mkdevmaps command is used by the init.d(4) scripts to create or update the /etc/security/device_maps file.
Entries are generated based on the device special files found in /dev. For the different categories of devices, the mkdevmaps command
checks for the following files under /dev:
audio /dev/audio, /dev/audioctl, /dev/sound/...
tape /dev/rst*, /dev/nrst*, /dev/rmt/...
floppy /dev/diskette, /dev/fd*, /dev/rdiskette, /dev/rfd*
removable disk /dev/dsk/c0t?d0s?, /dev/rdsk/c0t?d0s?
frame buffer /dev/fb
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
SEE ALSO
allocate(1), bsmconv(1M), attributes(5)
NOTES
mkdevmaps might not be supported in a future release of the Solaris operating system.
SunOS 5.10 8 Oct 2003 mkdevmaps(1M)