I have file like this
d
e
e
s
k
a
b
c
d
I just need to convert then as like this
dee
sk
abcd
For this purpose I used awk and xargs
xargs < file|awk '{ gsub (" ", "", $0); print}'
But it is not generating results as expected
I have file like this
d
e
e
s
k
a
b
c
d
I just need to convert then as like this
dee
sk
abcd
For this purpose I used awk and xargs
xargs < file|awk '{ gsub (" ", "", $0); print}'
But it is not generating results as expected
Could you please try following.
awk '
!NF && value{
print value
value=""
next
}
NF{
value=value $0
}
END{
if(value){
print value
}
}' Input_file