linux - Strange behaviour of indirection operator > in bash -
i trying dump output command line time.txt file needed script.
(time echo "hi") > time.txt what observed output of time command going terminal.
real 0m0.000s user 0m0.000s sys 0m0.000s and output of echo command redirected time.txt
$ cat time.txt $ hi why ? i'm having hard time understand this. how can redirect output of time command file ?
i'm using ubuntu14.04 in case matters.
in is there way redirect time output file in linux there 1 answer redirects time.txt.
but in case want time.txt contain output of time command, not output of echo.
not sure why post got reopened.
as seen in is there way redirect time output file in linux, need use:
{ time echo "hi" ; } 2> time.txt
Comments
Post a Comment