Operating System - HP-UX
1834462 Members
2840 Online
110067 Solutions
New Discussion

Query on migration NCR UNIX Rel 3.02 with HP-UX 11i

 
SOLVED
Go to solution
nishith
Frequent Advisor

Query on migration NCR UNIX Rel 3.02 with HP-UX 11i

we are migrating existing NCR UNIX MPRAS V Release 3.02 with HP-UX 11i for one of our customer.during migrating our shell scripts in test server we found that command "readtimeout" is not available in HP-UX 11i, I will appreciate if anyone can suggest the alternate of this.

I will explain the functionality of this command in NCR UNIX MPRAS V Release e.g.
When we enter the following command it will accept values from 0 to 10 from the user, in case if user not enter any response with in 60 seconds then automatically next command will be executed in the shell scripts.

/usr/lib/inet/bin/timedread -F10 -s60

Enter your choice in the range 0 - 10 (Default: 0 ): * (out put of the above command)

The other format of the same command is that it will accept from the user only y or n values and it will timeout if no response is entered with in the 60 seconds.

readtimeout 60 "Press RETURN For MENU"

Press RETURN For MENU :(y/n/?) ? y

1 REPLY 1
James R. Ferguson
Acclaimed Contributor
Solution

Re: Query on migration NCR UNIX Rel 3.02 with HP-UX 11i

Hi:

From a pure shell standpoint, you can use the 'line' command with its optional timeout switch. For example:

# info=`line -t 60`

See the 'line(1)' manpages for more information.

You will have to perform you own checking for the validity of the data read. The read, delivers everything up to a newline character.

Regards!

...JRF...