paste Verified current stable Not installed? Data Processing

Paste / Merge Files Side By With Custom Delimiter

Merge Files Side By With Custom Delimiter

Use the paste command to merge two files side by side with a specified delimiter.

$
Terminal
paste -d <delimiter> <path/to/file1> <path/to/file2>

When To Use

Merging two text files side by side with a custom delimiter for better readability.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
paste -d <delimiter> <path/to/file1> <path/to/file2>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
file1_col1	file2_col1
file1_col2	file2_col2
file1_col3	file2_col3

Command Breakdown

What each part is doing

paste
Base Command
The executable that performs this operation. Here it runs Paste before the shell applies any redirect operators.
-d
d| delimiters
The value supplied for d| delimiters.
<delimiter>
delimiter
The value supplied for delimiter.
<path/to/file1>
Input Files
The file path or paths supplied to this command.
<path/to/file2>
Input Files
The file path or paths supplied to this command.
-d
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Use the -d option to specify your custom delimiter.

  2. Step 2

    Provide the paths to the two files you want to merge.

  3. Step 3

    Run the command to see the output with the specified delimiter.

Alternative Approaches

Comparable commands in other tools

Alternative data processing tools for the same job.