Search Results

Search: Posts Made By: robinbannis
9,236
Posted By Vryali
Assuming you can remove the ===, as I'm not...
Assuming you can remove the ===, as I'm not really sure why they're there in a csv. Would make your headers 2+ spaces apart as well for consistency:

$ cat test
TradeDate Name SecurityMnc ...
9,236
Posted By pravin27
Try this ... awk '{ if(NR>2){ if(NF==4) {...
Try this ...
awk '{
if(NR>2){
if(NF==4) { print $1,$2,$3,$4 } else {
printf $1","$2","$3",";
for(i=4;i<=NF;i++) {
printf i==NF?$i"\n":$i FS
}
}} else {print} }' OFS="," filename
9,236
Posted By donadarsh
it will come like that only because is has space...
it will come like that only because is has space between that field. either separate that file with valid separator or use double quotes for the last field.

another way you can do is -

store...
Showing results 1 to 3 of 3

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