How would you change the output of the time command from:
EDIT: Using bash (OSX)
Put this in .bashrc: export TIMEFORMAT=%Rs
Then source ~/.bashrc.
Run type time to find out that time is a shell keyword. Then, run man bash (as bash is your shell) and search for "time".
time is a shell keyword
printf "%.2fs\n" $(TIMEFORMAT=%R bash -c 'time ...' 2>&1)
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3 years ago