| Linux Shell Scripting Tutorial (LSST) v1.05r3 | ||
| Chapter 5: Essential Utilities for Power User | ||
| | ||
Here students names are matched with their appropriate marks. How ? join utility uses the Sr.No. field to join to files. Notice that Sr.No. is the first field in both sname and smark file.
General Syntax of join utility:
Syntax:
join {file1} {file2}
Use of join utility:
The join utility joins, lines from separate files.
Note that join will only work, if there is common field in both file and if values are identical to each other.
| Putting lines together using paste utility | Translating range of characters using tr utility | |