1

I have compiled C file, named a.out which I run with time ./a.out

This gives me this output:

Values in data mining increases by 30 in 100 seconds

real    5m3.898s
user    4m3.889s
sys     3m0.008s

I have made a script to automate this:

#!/bin/bash

time /home/full.sh >> /home/data.txt

but in my data.txt file, I only see this (and not the time data):

Values in data mining increases by 30 in 100 seconds

1 Answers1

0

to get both time and script output you can use this

 { time script; } &> outputfile

note the & sign

karakfa
  • 66,216
  • 7
  • 41
  • 56