I have two files namely file1 and file2. I need to replace 16th line of file2 with 10th line of file1
Asked
Active
Viewed 34 times
1 Answers
1
Use sed (stream editor):
sed '16 s/.*/'"$(sed -n '10p' file1)"'/' file2
RomanPerekhrest
- 29,703
- 3
- 43
- 67