Display

Hello,

this will sound geek but I've got a shell script that takes an age to run.

I am wondering if someone as a function that will display like dash or something every second ? I could try to get it inside of this script when needed.

I am using ksh.

Thanks

There are several ways to debug a program/shell script.
For your specific case where the program is taking too long, you can try displaying date/time
before and after strategic places in your shell where you think the delay is happening:

echo `date`

Hello,

In fact it's not about to debug script, it's more to do not lost remote connexion. I know I could use the screen command and bg to make the job in background, but i need more a command that will display something like anything every 5 sec ...

But thanks.

You could try something like:

while : ; do
   sleep 5
   echo "Still running at $( date )"
done &
pid=$!

<YOUR CODE HERE>

kill $pid

Is it that the script itself is slow, or that something it calls or starts takes a long time to return?

If it is the script itself, you can built something into the script, just as the date reporting suggested above. If it is something that the script calls, a different solution is required.