question about linux time command??

Nov 18, 2011 at 6:48pm
ok so im running the time command on linux like this i try is many different ways
i already compile it
time sortselection.cpp <twolist
-bash: sortselection.cpp: command not found //line 2

real 0m0.002s
user 0m0.000s
sys 0m0.000s
why do i get line 2??? does this mean is running well or do i have to run it differently
my input file is twolist and sortselcection.cpp does the sort of list of numbers that is on two list is works but i want the time it takes to do
thanks
Nov 18, 2011 at 6:54pm
You have to run the time command on a complied program.
g++ sortselection.cpp
time ./a.out
Nov 18, 2011 at 6:56pm
i do
g++ sortselection.cpp
$ ./a.out <twolist //inputfile
==================
2
3
33
54
435
549
578
8789
==================
time sortselection.cpp <twolist
-bash: sortselection.cpp: command not found

real 0m0.002s
user 0m0.000s
sys 0m0.000s
Nov 18, 2011 at 6:58pm
time ./a.out < twolist

run this
Nov 18, 2011 at 7:09pm
omg thanks it work i appreciate it
Topic archived. No new replies allowed.