Re: Spliting file and save it with date...
| 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]