But I ll explain how awk could work here provided a nicely formatted tab separated table. Consider your file say file. At the end print the value of N. It has 8 fields. How can I do that? I used the following, but it's not the exact output. If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy. We'll send a magic link to your inbox. Email Address. All Sign in options. Enter a Email Address. Choose your interests Get the latest news, expert insights and market research, sent straight to your inbox.
Newsletter Topics Select minimum 1 topic. Data Management. Tags: Ab Initio. Hi, I want to get total number of fields in a record based on field separator.
Please help me to get total number of fields. Anonymous Posted October 27, 0 Comments. Thanks, Saravanan. Aritra Ghosh Posted October 27, 0 Comments. Use -v instead:. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Number of fields returned by awk Ask Question. Asked 10 years, 7 months ago.
Active 3 years, 5 months ago. Viewed k times. Improve this question. Sriram Sriram 9, 20 20 gold badges 74 74 silver badges bronze badges. Add a comment. Active Oldest Votes.
0コメント