Linux CLI - Text Processing
You want to replace the word 'cat' with 'dog' only on lines 2 to 4 in a file named
pets.txt. Which sed command achieves this?pets.txt. Which sed command achieves this?start,endcommand syntax, e.g., 2,4s/pattern/replacement/.2,4s/cat/dog/ to replace 'cat' with 'dog' on lines 2 to 4.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions