Bash command to 'cut' text into another text file & modifying text.
I have a text file named fruitsIlike.txt containing these lines:
I like Apples
I like Oranges
I like Grapes
I like Kiwis
I like Pie
What I want to do is to cut 1 or 2 lines and move it to another text file named movedhere.txt
and how do I modify say..."I like Kiwis" to "I don't like Kiwis"??
I was thinking the theory might be moving all lines before "I like Kiwis" and after it to 2 separate files, then deleting "I like Kiwis" and moving back the 1st batch of text to that file, echoing "I don't like Kiwis" and then moving back the 2nd batch of text.
or is there an easy way?lol