Re: bash and perl output of 'hello' with no \n doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Nov 2002, John wrote:

>Date: Fri, 15 Nov 2002 18:54:06 +0800 (WST)
>From: John <psyche@computerdatasafe.com.au>
>To: psyche-list@redhat.com
>Content-Type: TEXT/PLAIN; charset=US-ASCII
>List-Id: Discussion of Red Hat Linux 8.0 (Psyche) <psyche-list.redhat.com>
>Subject: Re: bash and perl output of 'hello' with no \n doesn't work
>
>On Fri, 15 Nov 2002, Marc Murphy wrote:
>
>> Has anyone else encountered this problem with a fresh install?
>> 
>> #!/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?
>> 
>It is not a Perl problem:
>summer@orange summer]$ xxd x
>0000000: 6865 6c6c 6f                             hello
>[summer@orange summer]$ cat x
>[summer@orange summer]$
>
>
>
>I'm beginning to think Psyche is a good one to miss.

Why?  You're doing something that is inherently broken.  If you 
slow everything down so that it is visible, you will see "hello" 
displayed, then see the program return to bash, which displays 
the prompt.  The prompt overwrites the line because there was no 
trailing newline.

Go ahead and miss Psyche.  Spend the time reading programming 
manuals to learn how stuff works instead.


-- 
Mike A. Harris		ftp://people.redhat.com/mharris
OS Systems Engineer
XFree86 maintainer
Red Hat Inc.



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux