<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sh script - find string in two different files and compare in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331205#M496402</link>
    <description>&lt;P&gt;I have just added a check so that is an UPDATE # from file1 is NOT found in any files in the /root/pw/test directory, then the script will continue on. &amp;nbsp;My previous versions just hung.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NEW FILE1

# cat file1
.BEGIN
UPDATE/4567890123,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/5552166619,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/5552194161,,,
.DELETE_ALL RELATED
ACCOUNT/52728912
.INSERT_RELATED/
RELATED/diffemail@myemail.net
.END_INSERT
.EOR



NEW SCRIPT

# cat script
#!/usr/bin/sh

for UPDATE in $(grep UPDATE file1 | awk -F \/ '{print $2}' | sed 's/,,,//g')
do
FILE1ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" file1 | awk -F \/ '{print $2}')
UPDATEFILE=$(grep -l ${UPDATE} /root/pw/test/*)
if [[ ${UPDATEFILE} != "" ]] ; then
   FILE2ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" ${UPDATEFILE} | awk -F \/ '{print $2}')
   if (( ${FILE1ACCT} == ${FILE2ACCT} )) ; then
      echo "The Account numbers are the same in FILE1 and ${UPDATEFILE} for update number ${UPDATE}"
      echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; ${UPDATEFILE} ACCT# = ${FILE2ACCT}"
      echo ""
   else
      echo "The Account numbers are DIFFERENT in FILE1 and ${UPDATEFILE} for update number ${UPDATE}"
      echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; ${UPDATEFILE} ACCT# = ${FILE2ACCT}"
      echo ""
   fi
fi
done


# ./script
The Account numbers are the same in FILE1 and /root/pw/test/file4 for update number 5552166619
Update # = 5552166619 ; FILE1 ACCT# = 52727963 ; /root/pw/test/file4 ACCT# = 52727963

The Account numbers are DIFFERENT in FILE1 and /root/pw/test/file3 for update number 5552194161
Update # = 5552194161 ; FILE1 ACCT# = 52728912 ; /root/pw/test/file3 ACCT# = 92728912&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2014 22:49:13 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2014-01-10T22:49:13Z</dc:date>
    <item>
      <title>sh script - find string in two different files and compare</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6330911#M496397</link>
      <description>&lt;P&gt;I think I am going to have a hard time explaining this one, so sorry in advance...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file that contains multiple entries:&lt;/P&gt;&lt;P&gt;.BEGIN&lt;BR /&gt;UPDATE/5552166619,,,&lt;BR /&gt;.DELETE_ALL RELATED&lt;BR /&gt;ACCOUNT/52727963&lt;BR /&gt;.INSERT_RELATED/&lt;BR /&gt;RELATED/myemail@email.net&lt;BR /&gt;.END_INSERT&lt;BR /&gt;.EOR&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;.BEGIN&lt;BR /&gt;UPDATE/5552194161,,,&lt;BR /&gt;.DELETE_ALL RELATED&lt;BR /&gt;ACCOUNT/52728912&lt;BR /&gt;.INSERT_RELATED/&lt;BR /&gt;RELATED/diffemail@myemail.net&lt;BR /&gt;.END_INSERT&lt;BR /&gt;.EOR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This goes on and on...&lt;/P&gt;&lt;P&gt;I have another file almost identical it may contain the same (UPDATE/7digits) it may not.&lt;/P&gt;&lt;P&gt;What I want to do it take the UPDATE/&amp;lt;7digits&amp;gt;&lt;/P&gt;&lt;P&gt;Look it up in 2nd file, and if it exists, compare the ACCOUNT and see if it is different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get the TN part:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;grep UPDATE * | awk '{print $2}'|sed 's/,,,//g' |sort -u &amp;gt; file&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then do a:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;for tn in `cat file`&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;do&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;grep $tn second.file&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I have no idea how to capture the ACCOUNT information from one file, and compare to second...&lt;/P&gt;&lt;P&gt;Appreciate the help.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 17:03:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6330911#M496397</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2014-01-10T17:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: sh script - find string in two different files and compare</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331171#M496398</link>
      <description>&lt;P&gt;What do you think of this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# cat file1
.BEGIN
UPDATE/5552166619,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/5552194161,,,
.DELETE_ALL RELATED
ACCOUNT/52728912
.INSERT_RELATED/
RELATED/diffemail@myemail.net
.END_INSERT
.EOR

# cat file2
.BEGIN
UPDATE/5552166619,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/5552194161,,,
.DELETE_ALL RELATED
ACCOUNT/92728912
.INSERT_RELATED/
RELATED/diffemail@myemail.net
.END_INSERT
.EOR


# cat script
#!/usr/bin/sh

for UPDATE in $(grep UPDATE file1 | awk -F \/ '{print $2}' | sed 's/,,,//g')
do
FILE1ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" file1 | awk -F \/ '{print $2}')
FILE2ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" file2 | awk -F \/ '{print $2}')
if (( ${FILE1ACCT} == ${FILE2ACCT} )) ; then
   echo "The Account numbers are the same in FILE1 and FILE2 for update number ${UPDATE}"
   echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; FILE2 ACCT# = ${FILE2ACCT}"
   echo ""
else
   echo "The Account numbers are DIFFERENT in FILE1 and FILE2 for update number ${UPDATE}"
   echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; FILE2 ACCT# = ${FILE2ACCT}"
   echo ""
fi
done&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And here's what it looks like when the script is run:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# ./script
The Account numbers are the same in FILE1 and FILE2 for update number 5552166619
Update # = 5552166619 ; FILE1 ACCT# = 52727963 ; FILE2 ACCT# = 52727963

The Account numbers are DIFFERENT in FILE1 and FILE2 for update number 5552194161
Update # = 5552194161 ; FILE1 ACCT# = 52728912 ; FILE2 ACCT# = 92728912&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The key is the 'sed -n' statement above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It searches through the file for the value of the UPDATE# (hopefully there is never more than 1 occurrence of any particular update number in a file) obtained from file1 and looks for the corresponding account numbers in both file1 and file2 by printing the 2nd line below the UPDATE #. &amp;nbsp;This also assumes that the Account number is always 2 lines below the Update number.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 21:56:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331171#M496398</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2014-01-10T21:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: sh script - find string in two different files and compare</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331183#M496399</link>
      <description>I will try, but the file2 is tricking me as I need to look the directory that has muliple files in it for the TN... Then pull the account and check.</description>
      <pubDate>Fri, 10 Jan 2014 22:24:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331183#M496399</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2014-01-10T22:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: sh script - find string in two different files and compare</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331191#M496400</link>
      <description>&lt;P&gt;Is the FILE1 file in same directory as the other files you need to check?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 22:30:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331191#M496400</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2014-01-10T22:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: sh script - find string in two different files and compare</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331197#M496401</link>
      <description>&lt;P&gt;OK, file1 is the same as above and is in the /root/pw directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created 2 other files called file3 and file4 in the /root/pw/test directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the files, the script and the results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# pwd
/root/pw

# cat test/file3
.BEGIN
UPDATE/1234567890,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/5552194161,,,
.DELETE_ALL RELATED
ACCOUNT/92728912
.INSERT_RELATED/
RELATED/diffemail@myemail.net
.END_INSERT
.EOR


# cat test/file4
.BEGIN
UPDATE/5552166619,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/2345678901,,,
.DELETE_ALL RELATED
ACCOUNT/92728912
.INSERT_RELATED/
RELATED/diffemail@myemail.net
.END_INSERT
.EOR


# cat script
#!/usr/bin/sh

for UPDATE in $(grep UPDATE file1 | awk -F \/ '{print $2}' | sed 's/,,,//g')
do
FILE1ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" file1 | awk -F \/ '{print $2}')
UPDATEFILE=$(grep -l ${UPDATE} /root/pw/test/*)
FILE2ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" ${UPDATEFILE} | awk -F \/ '{print $2}')
if (( ${FILE1ACCT} == ${FILE2ACCT} )) ; then
   echo "The Account numbers are the same in FILE1 and ${UPDATEFILE} for update number ${UPDATE}"
   echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; ${UPDATEFILE} ACCT# = ${FILE2ACCT}"
   echo ""
else
   echo "The Account numbers are DIFFERENT in FILE1 and ${UPDATEFILE} for update number ${UPDATE}"
   echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; ${UPDATEFILE} ACCT# = ${FILE2ACCT}"
   echo ""
fi
done


# ./script
The Account numbers are the same in FILE1 and /root/pw/test/file4 for update number 5552166619
Update # = 5552166619 ; FILE1 ACCT# = 52727963 ; /root/pw/test/file4 ACCT# = 52727963

The Account numbers are DIFFERENT in FILE1 and /root/pw/test/file3 for update number 5552194161
Update # = 5552194161 ; FILE1 ACCT# = 52728912 ; /root/pw/test/file3 ACCT# = 92728912&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The 'grep -l' in the script searches through the files in /root/pw/test and returns the filename of the file with the same UPDATE number. &amp;nbsp;The sed statement for FILE2ACCT then looks for the ACCT# in the file returned by the 'grep -l' command.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 22:45:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331197#M496401</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2014-01-10T22:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: sh script - find string in two different files and compare</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331205#M496402</link>
      <description>&lt;P&gt;I have just added a check so that is an UPDATE # from file1 is NOT found in any files in the /root/pw/test directory, then the script will continue on. &amp;nbsp;My previous versions just hung.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NEW FILE1

# cat file1
.BEGIN
UPDATE/4567890123,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/5552166619,,,
.DELETE_ALL RELATED
ACCOUNT/52727963
.INSERT_RELATED/
RELATED/myemail@email.net
.END_INSERT
.EOR

.BEGIN
UPDATE/5552194161,,,
.DELETE_ALL RELATED
ACCOUNT/52728912
.INSERT_RELATED/
RELATED/diffemail@myemail.net
.END_INSERT
.EOR



NEW SCRIPT

# cat script
#!/usr/bin/sh

for UPDATE in $(grep UPDATE file1 | awk -F \/ '{print $2}' | sed 's/,,,//g')
do
FILE1ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" file1 | awk -F \/ '{print $2}')
UPDATEFILE=$(grep -l ${UPDATE} /root/pw/test/*)
if [[ ${UPDATEFILE} != "" ]] ; then
   FILE2ACCT=$(sed -n "/${UPDATE}/{n;n;p;}" ${UPDATEFILE} | awk -F \/ '{print $2}')
   if (( ${FILE1ACCT} == ${FILE2ACCT} )) ; then
      echo "The Account numbers are the same in FILE1 and ${UPDATEFILE} for update number ${UPDATE}"
      echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; ${UPDATEFILE} ACCT# = ${FILE2ACCT}"
      echo ""
   else
      echo "The Account numbers are DIFFERENT in FILE1 and ${UPDATEFILE} for update number ${UPDATE}"
      echo "Update # = ${UPDATE} ; FILE1 ACCT# = ${FILE1ACCT} ; ${UPDATEFILE} ACCT# = ${FILE2ACCT}"
      echo ""
   fi
fi
done


# ./script
The Account numbers are the same in FILE1 and /root/pw/test/file4 for update number 5552166619
Update # = 5552166619 ; FILE1 ACCT# = 52727963 ; /root/pw/test/file4 ACCT# = 52727963

The Account numbers are DIFFERENT in FILE1 and /root/pw/test/file3 for update number 5552194161
Update # = 5552194161 ; FILE1 ACCT# = 52728912 ; /root/pw/test/file3 ACCT# = 92728912&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 22:49:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331205#M496402</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2014-01-10T22:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: sh script - find string in two different files and compare</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331275#M496403</link>
      <description>&lt;P&gt;Here is something a little easier to understand and is performant since it uses a hash and reads each file once:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;awk -v master=file1 '&lt;BR /&gt;# finds the number after "/" and before any ","&lt;BR /&gt;function crack_number(field) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; i = split(field, fields, "[/,]")&lt;BR /&gt;#&amp;nbsp;&amp;nbsp; print "found", i, "fields:", fields[2]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return fields[2] ""&amp;nbsp; # make sure it is a string&lt;BR /&gt;}&lt;BR /&gt;BEGIN {&lt;BR /&gt;# create a map from update # to account #&lt;BR /&gt;while (getline &amp;lt; master &amp;gt; 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if ($1 ~ "UPDATE") {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update = crack_number($1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if ($1 ~ "ACCOUNT") {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; account = crack_number($1)&lt;BR /&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print update "|" account&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map[update] = account&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;close(master)&lt;BR /&gt;}&lt;BR /&gt;/UPDATE/ {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; update = crack_number($1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; next&lt;BR /&gt;}&lt;BR /&gt;/ACCOUNT/ {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; account = crack_number($1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (update == "") {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "No update # for account", account&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; account_m = map[update]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (account_m == "") {&lt;BR /&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "update number", update, "in", FILENAME, "skipped"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update = ""&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (account == account_m) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "The Account numbers are the same in FILE1 and", FILENAME, "for update number", update&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Update # =", update "; FILE1 ACCT# =", account_m, "; FILE2 ACCT# =", account&lt;BR /&gt;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "The Account numbers are DIFFERENT in FILE1 and", FILENAME, "for update number", update&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Update # =", update "; FILE1 ACCT# =", account_m, "; FILE2 ACCT# =", account&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; print ""&lt;BR /&gt;&amp;nbsp;&amp;nbsp; update = ""&lt;BR /&gt;}' file3 file4&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 02:50:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-script-find-string-in-two-different-files-and-compare/m-p/6331275#M496403</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-01-11T02:50:36Z</dc:date>
    </item>
  </channel>
</rss>

