I would need the awk command or a better way to get my file that looks like
1234
5678
8912
3456
7890
to look like
1234,5678,8912,3456,7890
Thanks in advance
I would need the awk command or a better way to get my file that looks like
1234
5678
8912
3456
7890
to look like
1234,5678,8912,3456,7890
Thanks in advance
nawk -v ORS=, '{printf("%c%s", (FNR>1)?ORS:"",$0)}END{printf RS}' myFile
Thanks but the outcome is
,5678,8912,3456,7890
It missed the first line
Works just fine on Sun/Solaris.
Check you input once again - make sure the first line is not 'blank'.
Ok it works I was using the /usr/bin/nawk instead of the
/usr/xpg4/bin/awk