Use awk to remove scientific notation in a column
<p>While I'm sure that this has been answered <em>somewhere</em>, I can't find where, so I'm very sorry if this is a repeat. Here we go.</p>

<p>I have a file (really, I have many files) that has X, Y, and Z data points separated by spaces into three columns. I'm trying to 3d plot these with GNUplot, which, sadly, doesn't seem very pleased with scientific notation. Now, I can <strong>sed</strong> my way to (A*10**B) notation instead of (AE+B) notation, but GNUplot still doesn't recognize it. </p>

<p>I know I can convert from scientific notation with printf "%.5f" (I think five digits would be just fine), but I can't find how to format my input so that I can apply this to multiple columns, or, better yet, how to control the format for each column. I can convert a single value:</p>

<pre><code>echo ""|awk '{printf "%.5f", $2}' k11edit.dat
</code></pre>

<p>but I can't get it to handle multiple columns, nor even to maintain a space between values (a tab would be just fine, too; I'm not partial to a single space). </p>

<p>Here are a couple lines of my file:</p>

<pre><code>0.995 8.1584E-004 -0.17051415E+01
0.995 8.8934E-004 -0.17053282E+01
0.995 9.6284E-004 -0.17055150E+01
0.995 1.0363E-003 -0.17057018E+01
0.995 1.1098E-003 -0.17058886E+01
0.995 1.1833E-003 -0.17060754E+01
0.995 1.2568E-003 -0.17062623E+01
0.995 1.3303E-003 -0.17064493E+01
0.995 1.4038E-003 -0.17066362E+01
0.995 1.4773E-003 -0.17068232E+01
0.995 1.5508E-003 -0.17070103E+01
0.995 1.6243E-003 -0.17071973E+01
0.995 1.6978E-003 -0.17073846E+01
</code></pre>

<p>Yes, I'm aware that the first column doesn't change in these few lines, but it does further down (the file is ~30,000 lines long, so I thought a few lines would suffice here).</p>

<p>Could you help me out?</p>