comparision of two commands output in UNIX/LINUX

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Mahendra
Posts: 26
Joined: 23 Sep 2012 02:29

comparision of two commands output in UNIX/LINUX

#1 Post by Mahendra » 28 Jan 2014 11:03

Good Morning..!!

Thanks in advance for suggestions...

The solution required in linux and UNIX

i have two commands output. i want to compare from 1st command to 2nd command out and list out the difference items

runmqakm -cert -list all -db /var/mqm/qmgrs/ssl/key.kdb -pw agsgsg -type cms

! verisign certficate 1
! verisign certificate calss 3 type -3
! verisign class type 4 -G3
! verisign class type 4 -G5

runmqakm -cert -list all -db /var/mqm/qmgrs/ssltmp/key.kdb -pw agsgsg -type cms

! verisign certficate 1
! verisign certificate calss 3 type -3
! verisign certificate calss 3 type -5
! verisign certificate calss 3 type -7

here the 3rd and 4th certificates of 1st command are not available in the second command output. i want to list out those 2 certs details...the extra certs of 2nd command output can be ignored.

! verisign class type 4 -G3
! verisign class type 4 -G5

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: comparision of two commands output in UNIX/LINUX

#2 Post by Squashman » 28 Jan 2014 12:39

We don't deal with Unix/Linux shell scripts on this forum.

siberia-man
Posts: 208
Joined: 26 Dec 2013 09:28
Contact:

Re: comparision of two commands output in UNIX/LINUX

#3 Post by siberia-man » 28 Jan 2014 16:31

Have you ever read the mantra of differences?
Maybe you need use comm

Code: Select all

comm -23 file1 file2

Post Reply