Print the last column of each line in a file, using a comma (instead of space) as a field separator

awk

  • A versatile programming language for working on files.
    More information: <https://github.com/onetrueawk/awk>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

awk -F ',' '{print $NF}' {{filename}}

click the source code to copy install awk on any operating system with command-not-found.com