bash - How to begin at line n in a file with sed? -


when using sed sed -i 's/pattern/replacement/g' ./file.txt, how can tell sed skip first 10 lines of file, , begin replacements on 11th line?

you can use address before s command in sed:

sed -i.bak '11,$s/pattern/repalcement/g' file 

here 11,$ skip first 10 lines , start replacement 11th line onwards.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -