Question: I'd like to test the speed of a bash script and a Python script. How would I get the time it took to run them?

Answer: 
If you're on Linux (or another UN\*X), try [`time`](http://unixhelp.ed.ac.uk/CGI/man-cgi?time):

> 
> The time command runs the specified program command with the given
>  arguments. When command finishes, time writes a message to standard
>  error giving timing statistics about this program run. These statis-
>  tics consist of (i) the elapsed real time between invocation and termi-
>  nation, (ii) the user CPU time (the sum of the tms\_utime and tms\_cutime
>  values in a struct tms as returned by times(2)), and (iii) the system
>  CPU time (the sum of the tms\_stime and tms\_cstime values in a struct
>  tms as returned by times(2)).
> 
> 
> 

Note that you need to eliminate outer effects - e.g. other processes using the same resources can skew the measurement.
I guess that you can use

```
time ./script.sh
time python script.py

```