1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| % bash -x trancheHoraire.sh file.cvs
++ cat file.cvs
+ var='##"ORANGE FRANCE - Puteaux","23884","3.5467","0.32625","0","26577418","8390410","364999650","91138521","https://www.speedtest.net/result/c/c643aa2b-5046-4013-aefe-3fdf7044977f","1","17.9035","26.4743","2.991","257.569","4.27329","2.50788","2.273","57.746","3.194","3.789"'
++ echo '##"ORANGE' FRANCE - 'Puteaux","23884","3.5467","0.32625","0","26577418","8390410","364999650","91138521","https://www.speedtest.net/result/c/c643aa2b-5046-4013-aefe-3fdf7044977f","1","17.9035","26.4743","2.991","257.569","4.27329","2.50788","2.273","57.746","3.194","3.789"'
++ cut -d, -f1-1
+ Server_Name='##"ORANGE FRANCE - Puteaux"'
[je snippe un peu]
++ echo '##"ORANGE' FRANCE - 'Puteaux","23884","3.5467","0.32625","0","26577418","8390410","364999650","91138521","https://www.speedtest.net/result/c/c643aa2b-5046-4013-aefe-3fdf7044977f","1","17.9035","26.4743","2.991","257.569","4.27329","2.50788","2.273","57.746","3.194","3.789"'
++ cut -d, -f6-6
+ Download='"26577418"'
[je snippe encore un peu]
++ echo 'scale=3; "26577418"/ 125000'
++ bc
++ awk '{printf "%.2f\n", $0}'
(standard_in) 1: parse error
+ Download= |
Partager