Operating System - HP-UX
1752800 Members
5271 Online
108789 Solutions
New Discussion юеВ

Re: Hp-ux 10.20 behaviour problem

 
YairZaretski
Occasional Contributor

Hp-ux 10.20 behaviour problem

I have two hpux 10.20 servers. on both of them I have the same user account with the same shell and login scripts (regular posix shell). This user is trying to run a command which is prompting the following:
"Please press Return when ready".
The user is running this command in the following way:
command_name < input.txt
the contant of input.txt is:
^M
which is the Return signal.
The problem is that on one server this syntax works perfect and the command reacts as if someone has hit the Return key, yet on the other server the command still prompts for a Return key.
I don't believe it has anything to do with the shell, since I switched to csh on both servers and got the same behavior on both.
I tried copying the shell file and the startup scripts but it did not help.
Does anyhone have any idea what could be the difference between the two servers?
any help would be appreciated.
Thanks,
Yair
6 REPLIES 6
Fred Ruffet
Honored Contributor

Re: Hp-ux 10.20 behaviour problem

^M is not the return character for Unix. Problem may come from the fact that ^M is followed on one machine by a real return char. To verify, look at the file size on the two servers.

anyway, try to do the following on the two servers :
echo > input.txt
and then re-run your command. It will place the real ret char (\n) in the file. It should work better.

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
YairZaretski
Occasional Contributor

Re: Hp-ux 10.20 behaviour problem

Hey,

Thanks for your help.
This syntax works on one server as well.
The size of the files is the same.
Thanks,
Yair
OldSchool
Honored Contributor

Re: Hp-ux 10.20 behaviour problem

what does:

echo "\n" | command-name


do on both servers?
A. Clay Stephenson
Acclaimed Contributor

Re: Hp-ux 10.20 behaviour problem

As the same user on both boxes, compare the outputs of stty -a very carefully.
If it ain't broke, I can fix that.
YairZaretski
Occasional Contributor

Re: Hp-ux 10.20 behaviour problem

Hey,

echo "\n" did not help, but thanks.
the output of "sytty -a" was similar appart from one line, which is the last line of the output:
speed 9600 baud; line = 0;
rows = 0; columns = 0
min = 4; time = 0;
intr = ^C; quit = ^\; erase = DEL; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
parenb -parodd cs8 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3

the difference is that on the non-working server, the last line contained "tab3".
Thanks,
Yair
Dennis Handly
Acclaimed Contributor

Re: Hp-ux 10.20 behaviour problem

>the difference is that on the non-working server, the last line contained "tab3".

Did removing it fix it?
I'm not sure why:
tab0 tab1 tab2 tab3 Select style of delay for horizontal tabs

makes a difference?