I want to compare two text files for changes line by line. If the files are store locally I know I can do it with
grep -Fxvf file1 file2
I have a problem because file 2 is in Hadoop File System. I can read this file with the command
hadoop fs -cat /filepath/file2
So naturally I want to feed this result to grep. I tried something like
grep -Fxvf file1 ${hadoop fs -cat /filepath/file2}
but I get
-bash: ${hadoop fs -cat /filepath/file2}: bad substitution
I tried to use xargs also but with no luck. I appreciate any help.