1

I have a script that generates values :

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

I want to put $med into csv file that create graph on LibreOffice Calc

The bash script used by typing:

./bashcrispt.sh $1 $2 $3 $4.

Thanks

1
  • Here you have only one column in the .csv file? eh? Commented Apr 30, 2016 at 8:26

1 Answer 1

1

Change

echo "     "$med

to

echo $med >>your_csv_file_name.csv
Sign up to request clarification or add additional context in comments.

1 Comment

@unfoudev : That did it for you nope? Are you able to open in Libre Office?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.