0

How can I insert gaps at certain places in a text file using shell script? For example, I want to insert enter after word "complete" wherever it is found in a text file.

0

1 Answer 1

1

One of the possibilities is using sed :

sed 's/complete/complete\n/g' filename

To replace the content of the file directly, use sed -i....
To backup the original file with a .bak extension, use sed -i.bak....
In order to provide a more precise answer, your question should be more accurate.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .