bug-parallel
[Top][All Lists]
Advanced

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

Re: Quoting error: unexpected EOF while looking for matching `''


From: Hans Schou
Subject: Re: Quoting error: unexpected EOF while looking for matching `''
Date: Wed, 22 Sep 2010 10:50:46 +0200

These test is made with the latest version of parallel.

This is from host:castor:

address@hidden:~/parallel$ bash --version
GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.
address@hidden:~/parallel$ ls NEWS | ./src/parallel grep "'"
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
address@hidden:~/parallel$ ls NEWS | ./src/parallel -q grep "'"
* Alias for DBURL can contain '?query' part with %-quoting.
  sem 'sleep 2; echo foo'; sem 'sleep 1; echo bar'; sem --wait
  sem -j2 'sleep 2; echo foo'; sem -j2 'sleep 1; echo bar'; sem --wait
  cat tab_sep_table | parallel --colsep '\t' echo col1 {1} col2 {2}
* --sshloginfile '..' means use ~/.parallel/sshloginfile

Host=holst:

address@hidden:~/tmp/parallel$ bash --version
GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
address@hidden:~/tmp/parallel$ ls NEWS | ./src/parallel grep "'"
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
address@hidden:~/tmp/parallel$ ls NEWS | ./src/parallel -q grep "'"
* Alias for DBURL can contain '?query' part with %-quoting.
  sem 'sleep 2; echo foo'; sem 'sleep 1; echo bar'; sem --wait
  sem -j2 'sleep 2; echo foo'; sem -j2 'sleep 1; echo bar'; sem --wait
  cat tab_sep_table | parallel --colsep '\t' echo col1 {1} col2 {2}
* --sshloginfile '..' means use ~/.parallel/sshloginfile

host=far:
address@hidden ~/tmp/parallel $ bash --version
GNU bash, version 4.0.35(1)-release (i386-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
address@hidden ~/tmp/parallel $ ls NEWS | ./src/parallel grep "'"
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
address@hidden ~/tmp/parallel $ ls NEWS | ./src/parallel -q grep "'"
* Alias for DBURL can contain '?query' part with %-quoting.
  sem 'sleep 2; echo foo'; sem 'sleep 1; echo bar'; sem --wait
  sem -j2 'sleep 2; echo foo'; sem -j2 'sleep 1; echo bar'; sem --wait
  cat tab_sep_table | parallel --colsep '\t' echo col1 {1} col2 {2}
* --sshloginfile '..' means use ~/.parallel/sshloginfile

I dont have access to host=sko which has bash 4.1.5 rigt now. I'll try that later - also as another user.

/hans

2010/9/21 Ole Tange <address@hidden>
On Tue, Sep 21, 2010 at 5:34 PM, Hans Schou <address@hidden> wrote:
> 2010/9/21 Ole Tange <address@hidden>
>>
>> On Tue, Sep 21, 2010 at 3:54 PM, Hans Schou <address@hidden> wrote:
>> > 2010/9/21 Ole Tange <address@hidden>
>> >> On Tue, Sep 21, 2010 at 1:55 PM, Hans Schou <address@hidden> wrote:
>>
>> >> > This command has an error:
>> >> >   ls NEWS | parallel grep "'"
:
>> > But '-q' does not solve the problem. Backslash quoting does.
>>
>> That is odd: -q works for me:
>
> Me too. "parallel -q" works well with Bash version 4.0.35.

So is it correctly understood that everything works as expected in bash 4.0.35?

> Not the 4.1.5 version.

Is it correctly understood that when running under bash 4.1.5 you get:

$ ls NEWS | parallel -q grep "'"
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file

I have just tested bash-4.1.5(1)-release and I get the following
outout (which is what I would expect):

$ bash --version
GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ ls NEWS | parallel -q grep "'"
 sem 'sleep 2; echo foo'; sem 'sleep 1; echo bar'; sem --wait
 sem -j2 'sleep 2; echo foo'; sem -j2 'sleep 1; echo bar'; sem --wait
 cat tab_sep_table | parallel --colsep '\t' echo col1 {1} col2 {2}
* --sshloginfile '..' means use ~/.parallel/sshloginfile

So on my system bash 4.1.5 works as expected, too. My guess is that
your bash 4.1.5 installation does something unexpected. Maybe you have
some non-standard variables/options set?


/Ole


reply via email to

[Prev in Thread] Current Thread [Next in Thread]