Hello everyone,
I want to remove these signs like ">" and "<" which is visible in output file and requirement
is to develop a script to dispay the result in this format.
Inserted records
nbvxbb=dsf
bcbbbv=bfbv
dfjkfdj=bvfl
Deleted records
bvvfkbfdkb=vk afc
fdbvblvb=bvalds
modified records
bbbbv=blafciu
fdvbsfb=bchaf
My script is working but code i had developed to have this kind of output is not getting displayed.
Could you plz look into this code and suggest
me some modifications as per my required output format.
###########code########################
cat $1 | cut -d'|' -f 4,9 |sort >Temp1.txt
cat $2 | cut -d'|' -f 4,9 |sort >Temp2.txt
sdiff -s Temp1.txt Temp2.txt | fgrep ">" | awk -F "|" ' { print $1, "=" , $2>>"Resultantfile.txt" }'
sdiff -s Temp1.txt Temp2.txt | fgrep "<" | awk -F "|" ' { print $1, "=" , $2>>"Resultantfile.txt" }'
sdiff -s Temp1.txt Temp2.txt | awk '{ print $3}' | awk -F "|" ' { print $1, "=" , $2>>"Resultantfile.txt" }'
#################################################
OUTPUT FILE
COMPARISON BETWEEN OLD VALORIZATION FILE AND THE NEW VALORIZATION FILE/n
Newly inserted records are as follows
> @abcdefg@ = mnopq
> @hsdfkur@ = /exec/applis
Deleted records in the new file are as follows
@bkabdfh.core.admin.soft_dir@ = /exec/applis/bkbdV/ sdb/current/sof <
@arebfw.core.admin.unix_user@ = bdsbbsadf <
Modified records are as follows
=
=
@ bdasbhdfbhjksdbkfbkwer@ = blhalibfhfoiuhrefiu
@jvsaiuwlfdfffds@ = ndsfm xzchjbndsc
=
=
dESIRED OUTPUT
Newly inserted records are as follows
@abcdefg@ = mnopq
@hsdfkur@ = /exec/applis
Deleted records in the new file are as follows
@bkabdfh.core.admin.soft_dir@ = /exec/applis/bkbdV/ sdb/current/sof
@arebfw.core.admin.unix_user@ = bdsbbsadf
Modified records are as follows
@ bdasbhdfbhjksdbkfbkwer@ = blhalibfhfoiuhrefiu
@jvsaiuwlfdfffds@ = ndsfm xzchjbndsc
Any sort of help will be appreciated ..is goin to be useful for me.
Thanks in advance
Regards
Shahid