Can you write me a bash script that runs a program 50 times and calculates the average and standard deviation of the time it takes to run. You have to use the Unix `time` command to get the time to run. The program should be passed as an argument. Send all program outputs to null.
system
kya aap mujhe ek bash script likh sakate hai jo 50 baar ek program chalaata he or us samay ke ausat or maanak vichlan kii gananaa karata he jo ise chalaane ke liye letaa he.aapako chalaane ke liye samay paane ke liye UNIX `time` cmand kaa upyog karnaa hoga.kaarykram ko ek tark ke rup main paarit kiya janaa chahie.sabhi program output ko NULL par bhejein.
user
yahaan ek bash script he jo ek kaarykram ke ausat nishpaadan samay or maanak vichlan kii gananaa karti he:
`` `
#!/bin/bash

kaarykram = "$ 1"
ran = 50
samay = ()

for ((i = 1; i <= $ ran; i ++));karnaa
  Exec_time = $ (samay -f "%e" -q "$ program" 2> & 1 /dev /null)
  samay+= ("$ output")
ho gaya

kul = 0
"$ {samay [@]}" main samay ke liye;karnaa
  kul = $ (pratidhwani "$ kul + $ samay" | bc)
ho gaya
ausat = $ (iko "scale = 6; $ kul / $ ran" | BC)

sum_sq_diff = 0
"$ {samay [@]}" main samay ke liye;karnaa
  diff = $ (pratidhwani "$ samay - $ ausat" | bc)
  sq_diff = $ (echo "$ diff * $ diff" | bc)
  sum_sq_diff = $ (echo "$ sum_sq_diff + $ sq_diff" | bc)
ho gaya
vicharan = $ (iko "scale = 6; $ sum_sq_diff / $ ran" | bc)
std_deviation = $ (iko "scale = 6; sqrt ($ vicharan)" | bc)

iko "ausat nishpaadan samay: $ ausat second"
iko "maanak vichlan: $ std_deviation second"
`` `
assistant
<|system|>
</s>
<|user|>
kya aap mujhe ek bash script likh sakate hai jo 50 baar ek program chalaata he or us samay ke ausat or maanak vichlan kii gananaa karata he jo ise chalaane ke liye letaa he.aapako chalaane ke liye samay paane ke liye UNIX `time` cmand kaa upyog karnaa hoga.kaarykram ko ek tark ke rup main paarit kiya janaa chahie.sabhi program output ko NULL par bhejein.</s>
<|assistant|>
yahaan ek bash script he jo ek kaarykram ke ausat nishpaadan samay or maanak vichlan kii gananaa karti he:
`` `
#!/bin/bash

kaarykram = "$ 1"
ran = 50
samay = ()

for ((i = 1; i <= $ ran; i ++));karnaa
  Exec_time = $ (samay -f "%e" -q "$ program" 2> & 1 /dev /null)
  samay+= ("$ output")
ho gaya

kul = 0
"$ {samay [@]}" main samay ke liye;karnaa
  kul = $ (pratidhwani "$ kul + $ samay" | bc)
ho gaya
ausat = $ (iko "scale = 6; $ kul / $ ran" | BC)

sum_sq_diff = 0
"$ {samay [@]}" main samay ke liye;karnaa
  diff = $ (pratidhwani "$ samay - $ ausat" | bc)
  sq_diff = $ (echo "$ diff * $ diff" | bc)
  sum_sq_diff = $ (echo "$ sum_sq_diff + $ sq_diff" | bc)
ho gaya
vicharan = $ (iko "scale = 6; $ sum_sq_diff / $ ran" | bc)
std_deviation = $ (iko "scale = 6; sqrt ($ vicharan)" | bc)

iko "ausat nishpaadan samay: $ ausat second"
iko "maanak vichlan: $ std_deviation second"
`` `</s>
