I’m trying to tool around with some scripts I have inherited at work and wanted to see if someone could decipher what this expression is attempting to accomplish:
|sed -e 's#\(.\{36\}\)\(.*\)#\1|\2#g' | sed -e 's#\(.\{49\}\)\(.*\)#\1|\2#g'
I have tried to reverse engineer this via the reference manuals and google, but have not been successful.
Thanks!
This is two sed statements. The first inserts a pipe character (‘|’) after the first 36 characters of the line, the second inserts a pipe character after the first 49 characters (including the pipe it inserted in the first step).
As far as I can tell, these could be written more concisely with the same effect: