Reputation: 24423
When using sed
as sed -i 's/pattern/replacement/g' ./file.txt
, how can I tell sed
to skip the first 10 lines of a file, and begin the replacements on the 11th line?
Upvotes: 2
Views: 2993
Reputation: 785471
You can use address before s
command in sed
:
sed -i.bak '11,$s/pattern/repalcement/g' file
Here 11,$
will skip first 10 lines and start replacement from 11th line onwards.
Upvotes: 10