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
Post a Comment