title: Subtract a constant number from a column
body: <p>I have two large files (~10GB) as follows:</p>
  
  <p><strong>file1.csv</strong></p>
  
  <pre><code>name,id,dob,year,age,score
  Mike,1,2014-01-01,2016,2,20
  Ellen,2, 2012-01-01,2016,4,35
  .
  .
  </code></pre>
  
  <p><strong>file2.csv</strong></p>
  
  <pre><code>id,course_name,course_id
  1,math,101
  1,physics,102
  1,chemistry,103
  2,math,101
  2,physics,102
  2,chemistry,103
  .
  .
  </code></pre>
  
  <p>I want to subtract 1 from the "id" columns of these files:</p>
  
  <p><strong>file1_updated.csv</strong></p>
  
  <pre><code>name,id,dob,year,age,score
  Mike,0,2014-01-01,2016,2,20
  Ellen,0, 2012-01-01,2016,4,35
  </code></pre>
  
  <p><strong>file2_updated.csv</strong></p>
  
  <pre><code>id,course_name,course_id
  0,math,101
  0,physics,102
  0,chemistry,103
  1,math,101
  1,physics,102
  1,chemistry,103
  </code></pre>
  
  <p>I have tried <code>awk '{print ($1 - 1) "," $0}' file2.csv</code>, but did not get the correct result:</p>
  
  <pre><code>-1,id,course_name,course_id
  0,1,math,101
  0,1,physics,102
  0,1,chemistry,103
  1,2,math,101
  1,2,physics,102
  1,2,chemistry,103
  </code></pre>