Operating System - HP-UX
1753802 Members
7904 Online
108805 Solutions
New Discussion юеВ

Re: simultaneously running 2 scripts (ticker)

 
SOLVED
Go to solution
Bill McNAMARA_1
Honored Contributor

simultaneously running 2 scripts (ticker)

hi,

I'm using a remote connection to a server with only one terminal.
I get disconnected after 15 mins of inactivity.

I want to run a binary that will not output in an hour.

How can I run the binary so that I get output to the screen.

I was thinking of forking the binary from a script while running a ticker or equivalent...

Bill
It works for me (tm)
3 REPLIES 3
Bill McNAMARA_1
Honored Contributor

Re: simultaneously running 2 scripts (ticker)

the binary is ignite.

make_tape_recovery -v -A -I -d "hostA" -t "hostA"

Can I run that in the background? and tail -f the ignite log or
while true
do
sleep 5
echo "."
done

It works for me (tm)
James R. Ferguson
Acclaimed Contributor
Solution

Re: simultaneously running 2 scripts (ticker)

Hi Bill:

Yes, you could do as you suggest. By example, you could also craft something like the following:

#!/usr/bin/sh
function ticker
{
while true
do
print -u2 ".\c"
sleep 1
done
}
ticker &
PID=$!

date
sleep 10
date
kill ${PID}
exit 0

Regards!

...JRF...
Bill McNAMARA_1
Honored Contributor

Re: simultaneously running 2 scripts (ticker)

used as above..

also for ignite, no problem found to background the task and fg it when prompt was requested..

It works for me (tm)