Break single line into multiple lines based on a pattern
Hi All,
I have a file with a single line as below. Processing: [\\servername\filename1] Processing: [\\servername\filename2] Warning: [\\servername\filename3] Processing: [\\servername\filename4] Warning: [\\servername\filename5] Warning: [\\servername\filename6] Processing: [\\servername\filename7] Warning: [\\servername\filename8] I would like to break this line into multiple lines as below. Warning: [\\servername\filename3] Warning: [\\servername\filename5] Warning: [\\servername\filename6] Warning: [\\servername\filename8] Please do the needful by providing the command which gives this result. |
Hi raja219,
Quote:
|
Quote:
Meanwhile, in addition to perl, awk could do this, if you have ever tried. |
awk or sed - choose your poison.
|
All times are GMT -5. The time now is 07:33 PM. |