parallel
[Top][All Lists]
Advanced

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

Re: Dynamically changing remote servers list


From: Douglas A. Augusto
Subject: Re: Dynamically changing remote servers list
Date: Wed, 10 Sep 2014 19:33:15 -0300
User-agent: Mutt/1.5.23 (2014-03-12)

On 30/08/2014 at 08:19,
Ole Tange <tange@gnu.org> wrote:

> To turn off the special meaning of . you can use \Q..\E in perl:
> 
>    . is any char here\QHere . means [\.] and not any char\E. is any char again
> 
> So replace the sed with perl and do something like:
> 
>    '^(\d+/)?\Q'{}'\E$'

Hi,

Thanks for the suggestion. The following command almost worked:

   ...
   parallel -k "perl -ne 's#^(\d+\/)?\Q'{}'\E\$#\$_# and print and exit' 
original.slf" > tmp.slf
   ...

The problem now it that Perl doesn't seem to like '@' inside the expression
({}). For instance:

   echo 'user@server.net' | perl -ne '/\Quser@server.net\E/ and print'

does not print anything. But

   echo 'user at server.net' | perl -ne '/\Quser at server.net\E/ and print'

does. Any ideas?

-- 
Douglas A. Augusto



reply via email to

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