Submitted Questions

  • Print nth column of pattern

    How to print nth column of a pattern/file without using awk,cut commands?

    Praveena Rao

    • Oct 24th, 2017

    This one is for pattern and not file:
    echo ${var:n:1}


    • Jun 9th, 2017

    Read the lines by character and count the number of spaces (delimiter). When the count of space (delimiter) is n-1 (keeping in mind you need nth column), print the characters before next space (delimiter).