title: Script to switch columns according to their positive/negative increment
body: <p>The situation: I have 5 columns. Columns 2 and 3 are min and max ranges and column 4 is a value to indicate positive or negative increment (1 or -1). Columns 1 and 5 are ignored.</p>
  
  <p>However, columns 2 and 3 are currently min (lowest number) to max (highest number), and if column 4 is -1 I want them to be switched. Which script in Linux can do this?</p>
  
  <p>The text files looks like this (first 2 rows out of 400): <BR>
  <strong>44110,2100,2600,1,1 <BR>
  44200,3400,4500,-1,2</strong></p>
  
  <p>Therefore, in the output the second row would contain the switch and the first row would stay the same, as follows:  <BR>
  <strong>44110,2100,2600,1,1 <BR>
  44200,4500,3400,-1,2</strong></p>
  
  <p>Thank you in advance for your answers!</p>