title: repeat awk and if statement for all columns
body: <p>I have a file of more than 50 columns and I would like to output only fields with last character equals to 1 in all columns. How do loop the if statement shown below for all columns? </p>
  
  <pre><code>awk '{if(substr($0,length($0),1) == 1) print $0}' file_with_one_column.tsv 
  </code></pre>
  
  <p>extra info:
  (1) delimiter: tab
  (2) output format: same number of columns as input (excluding fields with last character != 1). i.e not one line ouput
  (3) same number of lines in all columns
  (4) issue: some fields contain only '.' charachter. </p>
  
  <p>I'm getting this issue when I tried to use for loop
  <code>awk: 1: unexpected character '.'</code> </p>
  
  <p>Example input:</p>
  
  <pre><code>ENSG00000267601.1    ENSG00000256861.1    ENSG00000259953.2
  DGCR8_H_2_2          .                    SAFB2_K_1_2
  IGF2BP3_H_1_1        DDX6_K_1_2           LIN28B_H_1_2
  NKRF_H_2_2           PPIL4_K_2_2          LIN28B_K_1_1
  IGF2BP1_H_2_2        CDC40_H_1_2          LIN28B_K_2_1
  POLR2G_H_2_2         IGF2BP3_H_1_2        .
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>ENSG00000267601.1    ENSG00000256861.1    ENSG00000259953.2
  IGF2BP3_H_1_1                             LIN28B_K_1_1
                                            LIN28B_K_2_1
  </code></pre>