title: How to print the first line of first column and second column as a single column with awk?
body: <p>I am trying to print the first line of first column and second column into single column with awk. I am using the following awk one-liner</p>
  <p><code>awk 'NR==1{printf $1 OFS; next}{print $2}' infile &gt; new_file</code></p>
  <pre><code>Input:
  A123 154.1
  A123 158.1
  A123 159.4
  
  Expected Output:
  A123
  154.1
  158.1
  159.4
  </code></pre>
  <p>But the resulted output from the one-liner is as follows</p>
  <pre><code>A123 154.1
  158.1
  159.4
  </code></pre>
  <p>I would like to what mistake causes the change in output. I included '\n' in the code but not helping.</p>
  <p>Thank you in advance</p>