Search Results

Search: Posts Made By: Scrutinizer
1,610
Posted By Scrutinizer
Explanation: awk ' { if(NF==1)$0=p FS...
Explanation:
awk '
{
if(NF==1)$0=p FS $0 # if there is only one field on a line then prepend the current line with p and a space
else p=$1 FS $2 # else set p to field 1, a...
1,610
Posted By Scrutinizer
Try: awk '{if(NF==1)$0=p FS $0; else p=$1 FS...
Try:
awk '{if(NF==1)$0=p FS $0; else p=$1 FS $2}1' file
Showing results 1 to 2 of 2

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