I have multiple files which have too many characters in the first line. I would line to trim the first line only after n characters. the characters to remove after different in every file and the characters before those to be removed. The rest of the lines of the file I need to remain unchanged.
For example
123456789123456789
important
important
important
will become
123456789
important
important
important
I have got this so far:
for i in *.txt; do sed -r 's/(.{10}).*/\1/' $i; done
but this trims all the lines, I only want to trim the first line and I cant figure out how to make it only apply to line 1.