Search Results

Search: Posts Made By: ygemici
3,588
Posted By ygemici
# awk '/{}$/{print}{printf "%s ",$0;}' first...
# awk '/{}$/{print}{printf "%s ",$0;}'

first execute [1.LINE]
/{}$/ [ you can think there is a `if` ] the pattern matched successfully then print (with default ORS="\n")
result --> NULL (because...
3,588
Posted By ygemici
try like this # awk '/{}$/{print;next}{printf...
try like this
# awk '/{}$/{print;next}{printf "%s",$0;}' file

and 2.solution
# awk -vFx='{}' '{if(substr($0,length-1,length)!=Fx)a=a $0;else {a=a $0;print a;a=""}}' file

regards
ygemici
Showing results 1 to 2 of 2

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