Skip to content
  • View menu
  • View sidebar

bioinfo core

Index & solution of bioInfo utilities

  • Home
  • All entries
  • Blogs
  • Contact
  • About

Categories

  • Between languages (7)
  • Blogs (8)
  • Python (35)
  • R (1)
  • Unix (37)

Tags

bedfile Blogs conda Excel html numpy Pandas Python R slurm Unix
04/06/202010/21/2021 by bioinfocore

Unix count how many columns in a csv or txt table

  • Unix
  • Unix
head -n1 input.csv | grep -o "," | wc -l
head -n1 input.csv | grep -o " " | wc -l

Source: https://stackoverflow.com/questions/5761212/count-number-of-columns-in-bash

Post navigation

← Previous Post Unix read command output into a variable
Next Post → Unix wait or delay before next command
Copyright 2022 | by bioinfocore