Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save loorlab/54fb122c7c30f0fe0cb54357753f743e to your computer and use it in GitHub Desktop.

Select an option

Save loorlab/54fb122c7c30f0fe0cb54357753f743e to your computer and use it in GitHub Desktop.
Count the total number of records in a comma-separated file (no-index.txt) in WIN, Bash console
expr $(tr -cd ',' < no-index.txt | wc -c) + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment