Re: Spliting file and save it with date...

"[email protected] [sed-users]" <[email protected]> 16 Sep 2017 22:45:45 +0000
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
Based on Jim's code, I shortened it a bit and, in case of GNU sed, removed the necessity to pipe the output through the shell, by using the 'e' command: 

 sed '/^</!{H;$!d};x;s/.*$date *= *"\([^"]*\).*/cat>\1.data<<\\@\n&\n@/e;d' file

 

 The ';d' at the end is there only for aesthetic reasons, to avoid printing empty lines.
 





[Non-text portions of this message have been removed]