Search Results

Search: Posts Made By: Nekki Basara
3,940
Posted By Nekki Basara
awk '{while(gsub(/[|]/,"&")!=3 || $0 ~...
awk '{while(gsub(/[|]/,"&")!=3 || $0 ~ /[|]$/){getline p;$0=$0 p}}1' file

This code seems working great on the sample!
Could someone kindly explain what it is doing? The regular expression here...
3,940
Posted By Nekki Basara
I tried to use this command but the result is not...
I tried to use this command but the result is not as expected



a|b|c|d
e|f|g||h
i|j|k|l
m|n|o||p
1|2|3|4
5|6|7|
8|a|b|c|d
e|f|g|h



some lines get more than 4 fields!

----------...
3,940
Posted By Nekki Basara
Questions on removing unexpected line breaks
I am a newbie in Linux and I am having trouble with a piece of data on hand.
The source data is like

a|b|c|d
e|f|g
|h
i|j|k|l
m|n|o
|p
1|2|3|4
5|6|7|
8
a|b|c|d
e|f|g|h

For each...
Showing results 1 to 3 of 3

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