Create csv file using bash script
<p>I have a script that generates values :</p>

<pre><code>#!/bin/bash
for i in `seq 1 1 $3`
do
    total=0
    for  j in `seq 1 $4`
    do
        ./sujet1 $1 $2 $i &gt; mediane
        read iter &lt; mediane
        total=` echo "scale=3; $total + $iter" | bc` 
    done
        med=` echo "scale=3 ; $total/$4"  | bc `
        echo "     "$med
done
</code></pre>

<p>I want to put <em>$med</em> into csv file that create graph on LibreOffice Calc </p>

<p>The bash script used by typing:</p>

<pre><code>./bashcrispt.sh $1 $2 $3 $4.
</code></pre>

<p>Thanks</p>