command execution time

Hi all,

I want to display a progressbar depending upon the completion status of a command. I am coding from scratch as I dont want to use in place code. so Is there anyway of getting the progress of a command in percentage or in any other units while its running , is it possible using the top command?

for example I am using command xyz which takes A time to complete
so if I fork the xyz , A/100* (something ) is complete every second , is it possible to find that something?

thanks in advance

Cheers,
Hashin

It depends on what the command is, and what it's doing, and whether you can measure its progress in some way.

Is it not possible to do a generic function which works for all commands?

And how would this generic function predict how long a process is going to take?

I dont know .. I want to know so I posted this thread :slight_smile:

Well, in that case, the answer is that it's virtually impossible. Sorry!