I was told that people using bash will have to differentiate between the shell-builtin time and /usr/bin/time ( time(1) ). I had to time a program and also had to find ways to automate input, using echo and string redirection <<<. These are the results,$ time python3 -c a=input();print(a) <<< 1212real    0m0.023suser    0m0.020ssys 0m0.000sThe shell-built-in is called in this ^ case.$ echo 12 | time python3 -c a=input();print(a)120.01user 0.00system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 6524maxresident)k0inputs+0outputs (0major+593minor)pagefaults 0swapstime(1) is being called in this case.Why is this happening ? Are they different environments ?Using Ubuntu 14.04 x86_64
Different 'time's called in similar environments in bash
bash;ubuntu;time
There is two types of time commands. One is shell built-in, belongs to bash. That's the one you see in your first example. Second one , is /usr/bin/time, that's the second one you saw.  As for why it's different output, it's because you cannot pipe output to shell builtins. More on that here