C Bash将数据输出到文件

C Bash将数据输出到文件,c,bash,append,output,C,Bash,Append,Output,我已经编译了名为a.out的C文件,我用时间运行它。/a.out 这给了我这个输出: Values in data mining increases by 30 in 100 seconds real 5m3.898s user 4m3.889s sys 3m0.008s 我制作了一个脚本来自动执行此操作: #!/bin/bash time /home/full.sh >> /home/data.txt 但在我的data.txt文件中,我只看到以下内容(而

我已经编译了名为
a.out
的C文件,我用
时间运行它。/a.out

这给了我这个输出:

Values in data mining increases by 30 in 100 seconds

real    5m3.898s
user    4m3.889s
sys     3m0.008s
我制作了一个脚本来自动执行此操作:

#!/bin/bash

time /home/full.sh >> /home/data.txt
但在我的
data.txt
文件中,我只看到以下内容(而不是时间数据):


要获得时间和脚本输出,可以使用

 { time script; } &> outputfile

注意
&
符号

要获得时间和脚本输出,您可以使用

 { time script; } &> outputfile

注意
符号

@terencehill不起作用。@terencehill不起作用。