I have a problem thatI can not solve even after scanning the Web. I trust in your help.
I have a text file that contains several strings of different lengths.
https: //insidemiamitatto.com/gugwywgifuw '"; https://insidemiamitatto.com/gugyiwyeiuiuweyiweyi '"; https://insidemiamitatto.com/gugyiipi9uuuppopi '";
I need to eliminate with Applescript or Terminal the last 3 characters, i.ee
I tried it with
sed, but my invocation eliminates the characters only from the longer strings, leaving the others with 3 characters.
Is there a way to eliminate the final 3 characters in each string?
I also have a second question:
Always with sed I can remove strings e.g:
sed -i.bak -e '1,200d; 1874,2842d'
This virtually eliminates a part of the initial and final text.
In the rest of the files, I string groups that alternate every 18 strings, and I would like to erase 17 in each group, for example:
1-18 19-37 38-55.
I would keep the strings
1 19 38.
sed or other feasible? I am using BBEdit, but every time I have to count manually, and it is exhausting when editing many files.