The join(1) command can be used to join lines from two files. Jut like in a database.
For example, using the example from the 7th edition of “An Introduction to Database Systems”
File1
D1 Marketing 10M
D2 Development 12M
D3 Research 5M
File2
E1 Lopez D1 40K
E2 Cheng D1 42K
E3 Finzi D2 30K
E4 Saito D2 35K
The files must first be sorted. Otherwise, not all possible joinings might be made.
More ...
A user at https://community.unix.com asked how find passes the name of a matched file to a sub-process in order to replace the {} placeholder.
The {} placeholder is used with the -exec option to find. The -exec option takes a command, including command line arguments, and executes the command for each file or directory matched by previous tests.
For example, if you are searching all regular files to try and find where the shell’s PATH variable is set, you could execute the following:
More ...