Mike A. Harris wrote:
I noticed that the default PS1 in bash works fine.On Fri, 15 Nov 2002, Marc Murphy wrote:Has anyone else encountered this problem with a fresh install?This isn't a bug. You're not generating a final '\n' character, and as such, when the program exits, and bash goes to display the prompt, it overwrites the 'hello' thus showing nothing.
#!/usr/bin/perl
print 'hello';
Does not print, but if I redirect the output to a file using, it does. It also will print if I use the \n character. When I use csh the newline character is not needed. Can anyone tell me what is going on?
You should ensure that any buffers are flushed properly before your program exits.
So Marc changed PS1 and did it wrong. The problem isn't really the script or bash.
Still, the NL should be there, but it's not required.
Marc, if you want to insure that PS1 (the normal prompt) starts at the beginning of the line,
use a LF (newline, \n), not CR (carrige return, \r).
-Thomas
--
Psyche-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/psyche-list