Search Results

Search: Posts Made By: harry123
4,141
Posted By RudiC
This is not the concept of "columns" (as to my...
This is not the concept of "columns" (as to my understanding). Columns are repeating structures of records (or rows) in a (DB or spread sheet or ...) table or file. E.g. Col1 has "Last Name", Col2...
4,141
Posted By Don Cragun
Your desired output format isn't clear, but maybe...
Your desired output format isn't clear, but maybe something like:
awk -F'"' '
{ nf = gsub(/,/, ",") + 1
for(i = 2; i <= NF; i += 2)
nf -= gsub(/,/, ",", $i)
printf("%s\tresult:%d\n", $0, nf)...
4,141
Posted By Don Cragun
You said you wanted to count columns, but your...
You said you wanted to count columns, but your sample output seems to be counting commas instead of columns. To count columns, you might try:
awk -F'"' '
{ nf = gsub(/,/, ",") + 1
for(i = 2; i...
Showing results 1 to 3 of 3

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