I have a command which finds and prints the filenames, but I am having a problem understanding the part "FS=/ <(find)" . The full command is:
awk 'NR==FNR{a[$2];next}$NF in a' FS=, data.txt FS=/ <(find)
And the output is:
user>./test.sh data.txt
./test1/file1 ./test2/file2 ./test3/file3
./test1/file1 ./test2/file2 ./test3/file3
./test1/file1 ./test2/file2 ./test3/file3
Why does it output every file 3 times? I want only one time, because there is only file1 file2 file3. And the content of data.txt is:
user>cat data.txt
dir1,file2,2018/07/04,2009/10/12 10:45,john
dir3,file1,2018/07/04,2005/08/07 13:57,john
dir3,file3,2018/07/04,2006/10/14 09:56,john