3 added 4 characters in body
source | link

I have two text file "account.txt" and "customer.txt"

**account.txt**

876251251
716126181
888281211
666615211
787878787
111212134

**customer.txt**

876251251
716126181
792342108
792332668
666615211
760332429
791952441
676702288

I need to compare "account.txt" with "customer.txt".

  • All account numbers from account.txt should be present in customer.txt file and if customer.txt is missing any "account number" then we should print out all those account numbers which are missing in customer.txt.
  • And also all those extra customer numbers in customer.txt that are not present in account.txt file, I want to print that as well.

Output should be:

Missing Account Number:
888281211
787878787
111212134

Extra Customer Number:
792342108
792332668
760332429
791952441
676702288

Is this possible to do in linux? I started off like this but it only does the first case I want, not the second one? Also I need to print the output in the above format.

comm -23 account.txt customer.txt

Note:Note: It could be possible that there are some strings or empty lines in those files so we need to discard that in the comparison if we see any. We only need to compare valid numbers.

I have two text file "account.txt" and "customer.txt"

**account.txt**

876251251
716126181
888281211
666615211
787878787
111212134

**customer.txt**

876251251
716126181
792342108
792332668
666615211
760332429
791952441
676702288

I need to compare "account.txt" with "customer.txt".

  • All account numbers from account.txt should be present in customer.txt file and if customer.txt is missing any "account number" then we should print out all those account numbers which are missing in customer.txt.
  • And also all those extra customer numbers in customer.txt that are not present in account.txt file, I want to print that as well.

Output should be:

Missing Account Number:
888281211
787878787
111212134

Extra Customer Number:
792342108
792332668
760332429
791952441
676702288

Is this possible to do in linux? I started off like this but it only does the first case I want, not the second one? Also I need to print the output in the above format.

comm -23 account.txt customer.txt

Note: It could be possible that there are some strings or empty lines in those files so we need to discard that in the comparison if we see any. We only need to compare valid numbers.

I have two text file "account.txt" and "customer.txt"

**account.txt**

876251251
716126181
888281211
666615211
787878787
111212134

**customer.txt**

876251251
716126181
792342108
792332668
666615211
760332429
791952441
676702288

I need to compare "account.txt" with "customer.txt".

  • All account numbers from account.txt should be present in customer.txt file and if customer.txt is missing any "account number" then we should print out all those account numbers which are missing in customer.txt.
  • And also all those extra customer numbers in customer.txt that are not present in account.txt file, I want to print that as well.

Output should be:

Missing Account Number:
888281211
787878787
111212134

Extra Customer Number:
792342108
792332668
760332429
791952441
676702288

Is this possible to do in linux? I started off like this but it only does the first case I want, not the second one? Also I need to print the output in the above format.

comm -23 account.txt customer.txt

Note: It could be possible that there are some strings or empty lines in those files so we need to discard that in the comparison if we see any. We only need to compare valid numbers.

2 added 39 characters in body
source | link

I have two text file "account.txt" and "customer.txt"

**account.txt**

876251251
716126181
888281211
666615211
787878787
111212134

**customer.txt**

876251251
716126181
792342108
792332668
666615211
760332429
791952441
676702288

I need to compare "account.txt" with "customer.txt".

  • All account numbers from account.txt should be present in customer.txt file and if customer.txt is missing any "account number" then we should print out all those account numbers which are missing in customer.txt.
  • And also all those extra customer numbers in customer.txt that are not present in account.txt file, I want to print that as well.

Output should be:

Missing Account Number:
888281211
787878787
111212134

Extra Customer Number:
792342108
792332668
760332429
791952441
676702288

Is this possible to do in linux? I started off like this but it only does the first case I want, not the second one? Also I need to print the output in the above format.

comm -23 account.txt customer.txt

Note: It could be possible that there are some strings or empty lines in those files so we need to discard that in the comparison if we see any. We only need to compare valid numbers.

I have two text file "account.txt" and "customer.txt"

**account.txt**

876251251
716126181
888281211
666615211
787878787
111212134

**customer.txt**

876251251
716126181
792342108
792332668
666615211
760332429
791952441
676702288

I need to compare "account.txt" with "customer.txt".

  • All account numbers from account.txt should be present in customer.txt file and if customer.txt is missing any "account number" then we should print out all those account numbers which are missing in customer.txt.
  • And also all those extra customer numbers in customer.txt that are not present in account.txt file, I want to print that as well.

Output should be:

Missing Account Number:
888281211
787878787
111212134

Extra Customer Number:
792342108
792332668
760332429
791952441
676702288

Is this possible to do in linux? I started off like this but it only does the first case I want, not the second one? Also I need to print the output in the above format.

comm -23 account.txt customer.txt

Note: It could be possible that there are some strings or empty lines in those files so we need to discard that in the comparison if we see any.

I have two text file "account.txt" and "customer.txt"

**account.txt**

876251251
716126181
888281211
666615211
787878787
111212134

**customer.txt**

876251251
716126181
792342108
792332668
666615211
760332429
791952441
676702288

I need to compare "account.txt" with "customer.txt".

  • All account numbers from account.txt should be present in customer.txt file and if customer.txt is missing any "account number" then we should print out all those account numbers which are missing in customer.txt.
  • And also all those extra customer numbers in customer.txt that are not present in account.txt file, I want to print that as well.

Output should be:

Missing Account Number:
888281211
787878787
111212134

Extra Customer Number:
792342108
792332668
760332429
791952441
676702288

Is this possible to do in linux? I started off like this but it only does the first case I want, not the second one? Also I need to print the output in the above format.

comm -23 account.txt customer.txt

Note: It could be possible that there are some strings or empty lines in those files so we need to discard that in the comparison if we see any. We only need to compare valid numbers.

1
source | link

find the difference between two files and print it in the proper format

I have two text file "account.txt" and "customer.txt"

**account.txt**

876251251
716126181
888281211
666615211
787878787
111212134

**customer.txt**

876251251
716126181
792342108
792332668
666615211
760332429
791952441
676702288

I need to compare "account.txt" with "customer.txt".

  • All account numbers from account.txt should be present in customer.txt file and if customer.txt is missing any "account number" then we should print out all those account numbers which are missing in customer.txt.
  • And also all those extra customer numbers in customer.txt that are not present in account.txt file, I want to print that as well.

Output should be:

Missing Account Number:
888281211
787878787
111212134

Extra Customer Number:
792342108
792332668
760332429
791952441
676702288

Is this possible to do in linux? I started off like this but it only does the first case I want, not the second one? Also I need to print the output in the above format.

comm -23 account.txt customer.txt

Note: It could be possible that there are some strings or empty lines in those files so we need to discard that in the comparison if we see any.