Suppose as an example that I want to run some script in a terminal (or some command/snippet that I just hardcoded into it). I wonder if it exists a tool for analyzing live statistics of machine usage (% CPU, execution speed, dedicated memory, etc.) which I can pipe my script into or something like that, so I can obtain this data in the output just after the script's output.
I've had no luck searching in Google, neither in SO questions. I'm using Ubuntu 14.04
EDIT: Using the manual indications, I tried up this way:
:~$ time -f "CPU %P%%\nMax RAM %M\n" ./myscript.sh
-f: command not found
/*
normal output
*/
:~$
also tried:
:~$ time --format="CPU %P%%\nMax RAM %M\n" ./myscript.sh
--format: command not found
/*
normal output
*/
:~$
also, as a desperate measure:
:~$ time --verbose ./myscript.sh
--verbose: command not found
/*
normal output
*/
:~$
Nothing works. I don't understand why args are rejected.