title: How can I change a value by a calculation in a csv file with Powershell
body: <p>I've got this csv file (which has no header) :</p>
  <pre><code>001;0
  002;7
  003;192
  004;72
  </code></pre>
  <p>Using powershell (for automation purpose), <strong>I need to decrement by 1 the value of the second column</strong>, so the output should be this :</p>
  <pre><code>001;-1
  002;6
  003;191
  004;71
  </code></pre>
  <p>I can't find any solution without adding a header to the file (which is done with <a href="https://pastebin.com/7kf1wSd8" rel="nofollow noreferrer">this code</a>).</p>
  <p>Below is where I am currently, struggling between the two pipes.</p>
  <pre><code>$input = &quot;input.csv&quot;
  $output = &quot;output.csv&quot;
  
  Import-CSV $input |  | Export-CSV -Path $output -NoTypeInformation
  </code></pre>
  <p>Thanks !</p>