I'm fairly new to scripting in Linux, and I'm trying to write a script to do the following:
I have a text file that contains many lines that look like this:
I'm trying to make my script read this text file, find the string sequence "QIEN", and delete everything from this sequence backwards (including "QIEN") so that the above lines look something like this:
I'm aware that grep is good to do a regular find-and-delete as follows:
But this will delete everything on the lines that contain the string sequence "QIEN".
Any ideas or suggestions will be much appreciated!