Skip to main content
Added an explanation of column.file\
Source Link
terdon
  • 252.2k
  • 69
  • 480
  • 718

To do not involve some heavy instruments (like sed or awk):

paste -d',' <(cut -d',' -f-2 file) column.file <(cut -d',' -f3- file)

This assumes that the column you want to add is saved in the file column.file.

To do not involve some heavy instruments (like sed or awk):

paste -d',' <(cut -d',' -f-2 file) column.file <(cut -d',' -f3- file)

To do not involve some heavy instruments (like sed or awk):

paste -d',' <(cut -d',' -f-2 file) column.file <(cut -d',' -f3- file)

This assumes that the column you want to add is saved in the file column.file.

Source Link
Costas
  • 15k
  • 23
  • 38

To do not involve some heavy instruments (like sed or awk):

paste -d',' <(cut -d',' -f-2 file) column.file <(cut -d',' -f3- file)