Take the following file ...
ABCD,1234,http://example.com/mpe.exthttp://example/xyz.ext
EFGH,5678,http://example.com/wer.exthttp://example/ljn.ext
Note that "ext" is the permanent file extension in the file.
I am looking for an expression to turn this file into something similar ...
ABCD,1234,http:
ABCD,1234,http:
EFGH,5678,http:
EFGH,5678,http:
In a nutshell, I need to collect everything up to the URL. Then I need to commit each URL and put them in my line with the lead capture.
I am working with sed to do this, and I cannot figure out how to make it work correctly. Any ideas?
source
share