Page 1 of 1

comparision of two commands output in UNIX/LINUX

Posted: 28 Jan 2014 11:03
by Mahendra
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

Re: comparision of two commands output in UNIX/LINUX

Posted: 28 Jan 2014 12:39
by Squashman
We don't deal with Unix/Linux shell scripts on this forum.

Re: comparision of two commands output in UNIX/LINUX

Posted: 28 Jan 2014 16:31
by siberia-man
Have you ever read the mantra of differences?
Maybe you need use comm

Code: Select all

comm -23 file1 file2