-1

I have two files namely file1 and file2. I need to replace 16th line of file2 with 10th line of file1

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
sarath
  • 1

1 Answers1

1

Use sed (stream editor):

sed '16 s/.*/'"$(sed -n '10p' file1)"'/' file2