Re: PATH and $0

2006-07-12 Thread Cai Qian
Hi, On 7/12/06, Stephane Chazelas <[EMAIL PROTECTED]> wrote: On Tue, Jul 11, 2006 at 08:19:34PM -0400, Dave Rutherford wrote: > On 7/11/06, Cai Qian <[EMAIL PROTECTED]> wrote: > >I want its full pathname using 'dirname', but it will give me > >unexpected

Re: PATH and $0

2006-07-11 Thread Cai Qian
Hi, I want its full pathname using 'dirname', but it will give me unexpected result on some Linux or Bash versions. Qian On 7/11/06, Dave Rutherford <[EMAIL PROTECTED]> wrote: On 7/11/06, Cai Qian <[EMAIL PROTECTED]> wrote: > In some Linux, it will print "/tmp/

PATH and $0

2006-07-11 Thread Cai Qian
Hi, What is the expected result of the following script? #! /bin/bash - export PATH=/tmp/ echo $0 exit 0 Then, put this file to /tmp/. cd / and run PATH=/tmp/ script.sh In some Linux, it will print "/tmp/script.sh", while in other, it will print "script.sh" only. Which is wrong? If both are

Re: EOF does not work in echo

2006-05-25 Thread Cai Qian
Hi, On 5/26/06, Chris F.A. Johnson <[EMAIL PROTECTED]> wrote: On 2006-05-25, Cai Qian wrote: > Hi, > > echo -e "hello \004world" | cat > > will print out > > hello world As it should. > echo -e "hello \004world" | cat > /dev/null >

Re: EOF does not work in echo

2006-05-25 Thread Cai Qian
The problem is "cat" does not stop reading when see the EOF through the pipe. echo -e "hello \004world" | cat > log you cat still see the Control-D in the log. Qian On 5/26/06, Mike Frysinger <[EMAIL PROTECTED]> wrote: On Thursday 25 May 2006 18:56, Cai Qian wrot

EOF does not work in echo

2006-05-25 Thread Cai Qian
Hi, echo -e "hello \004world" | cat will print out hello world echo -e "hello \004world" | cat > /dev/null will print out nothing It suggests that "cat" has not seen EOF (004) generated by echo. Qian ___ Bug-bash mailing list Bug-bash@gnu.org ht

Re: here document and STDIN

2006-05-23 Thread Cai Qian
The information is helpful. The problem by using perl -e ' X ' is that there seems no way to using single quota in Perl code any more. On 5/23/06, Paul Jarc <[EMAIL PROTECTED]> wrote: "Cai Qian" <[EMAIL PROTECTED]> wrote: > For following code, >

here document and STDIN

2006-05-23 Thread Cai Qian
Hi, For following code, sh