Search Results

Search: Posts Made By: jassi10781
2,043
Posted By RavinderSingh13
Hello Jassi, Not sure about your logic but...
Hello Jassi,

Not sure about your logic but as per your output following may help you in same.

awk -vone=1 -vtwo=2 -vthree=3 -F, '{for(i=1;i<=NF;i++){A=i%3==0?A ORS $i one ORS $i two ORS $i...
4,344
Posted By RudiC
Any attempt from your side? ---------- Post...
Any attempt from your side?

---------- Post updated at 20:45 ---------- Previous update was at 20:44 ----------

Howsoever, try
awk 'NF {TMP=TMP $0; next} {print TMP ";"; TMP=""} END {print TMP...
4,344
Posted By Don Cragun
You could also try: awk '{printf("%s", NF ? $0...
You could also try:
awk '{printf("%s", NF ? $0 : ";\n")}END{print ";"}' file
4,344
Posted By Akshay Hegde
You may also try [akshay@localhost tmp]$ cat...
You may also try

[akshay@localhost tmp]$ cat file
ABC
DEF
GHI
JKL

MNO
PQR
STU
VWX

YZA
[akshay@localhost tmp]$ awk '!NF{print ";\n"}END{print ";\n"}1' ORS="" file
ABCDEFGHIJKL;...
Showing results 1 to 4 of 4

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