Kstevens
Computer
- Feb 26, 2003
- 2
I have this strange problem. It started simple enough. The problem was Ctrl-C would not exit a tail -f. Here is the full command I ran when this happened.
ls -l | tail +3 | cut -c55- | sort | uniq -c; tail -f a.log
When I hit Ctrl-C, only ^c would be printed out to my screen but I was not taken back to the prompt. So I disconnected from my session and logged back in. I ran stty -a to check the intr which was set to ^c. I was able to change the intr to Ctrl-H which also did not cancel the tail -f. Ctrl works when I run the tail -f alone with no command in front of it and it also works if I shorten the command to:
ls -l | tail +3 | cut -c55- | sort; tail -f a.log
Now, I understand I can simply just hit return before I run a tail -f so this problem is not critical but this does perplex me a little.
This does not happen in csh or bash, only when I'm using ksh. This also does not happen on every UNIX box I'm on. This only happens on three as far as I can tell out of 20 or so.
I can place the lines in a short shell script and it works fine. For example: script; tail -f a.log
I have tried telnet, rlogin, and netterm. They all gave the same results. I also replace tail -f with sleep 20 and that didn't make a difference either.
Does anyone know if this is a small bug in ksh or has any other ideas why this might be happening?
Thanks,
Kev
ls -l | tail +3 | cut -c55- | sort | uniq -c; tail -f a.log
When I hit Ctrl-C, only ^c would be printed out to my screen but I was not taken back to the prompt. So I disconnected from my session and logged back in. I ran stty -a to check the intr which was set to ^c. I was able to change the intr to Ctrl-H which also did not cancel the tail -f. Ctrl works when I run the tail -f alone with no command in front of it and it also works if I shorten the command to:
ls -l | tail +3 | cut -c55- | sort; tail -f a.log
Now, I understand I can simply just hit return before I run a tail -f so this problem is not critical but this does perplex me a little.
This does not happen in csh or bash, only when I'm using ksh. This also does not happen on every UNIX box I'm on. This only happens on three as far as I can tell out of 20 or so.
I can place the lines in a short shell script and it works fine. For example: script; tail -f a.log
I have tried telnet, rlogin, and netterm. They all gave the same results. I also replace tail -f with sleep 20 and that didn't make a difference either.
Does anyone know if this is a small bug in ksh or has any other ideas why this might be happening?
Thanks,
Kev