Search Results

Search: Posts Made By: nixtime
2,677
Posted By nixtime
Hi RudiC, It concatenates even if the next...
Hi RudiC,

It concatenates even if the next line does not have a '|'.

Test data
12345671|abcd|0
|123456789
12345672|abcd|0
1|23456789
12345673|abcd|0
12|3456789
12345674|abcd|0...
2,677
Posted By nixtime
Thank you bartus11.That worked. Using the...
Thank you bartus11.That worked.

Using the same logic, I was able to test the below as well when the next line has '|' as the 3rd character.

perl -0pe 's/\n([^\n]([^\n]\|))/$1/g' file
...
2,677
Posted By nixtime
Thank you Bartus11 and Yoda. The suggestion...
Thank you Bartus11 and Yoda.

The suggestion made by Bartus11 worked as expected. Updated the exact expected rows.
The suggestion made by Yoda worked, but updated about 2K additional rows.
...
2,677
Posted By nixtime
How to concatenate lines with specific pattern?
How to concatenate lines with specific pattern?
I have data dumped from a table into text file. In some occurrence the data row is split into two rows.

Example:


12345678|Global...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy