On 14/01/10 10:34, Andre Timmermann wrote:
> Am Mittwoch, den 13.01.2010, 16:01 -0500 schrieb Andrew Schulman:
> 
>>>
>>> debug: Executing '/usr/bin/perl -ni -e 'print unless /^\Qssh-rsa
>>> AAAAB3NzaC1yc2EAA/5GytXDjAR3XoxTR6uM= test...@test
>>> \E$/' '/root/.ssh/authorized_keys''
>>
>> Change /.../ to m{...} .
> 
> This has no effect - it does not delete the key.
> 
> I have discovered, that "test...@test" is the problem, the "@" is
> interpreted as an perl-array. Unfortunately escaping it with "\" does
> not help...

Hmm, that should work.

I created a file named "test" containing:

ssh-rsa AAAAB3NzaC1yc2EAA/5GytXDjAR3XoxTR6uM= test...@test
asdasdasd
asdasdasd

I then ran this (all on one line):

perl -ni -e 'print unless m{^\Qssh-rsa
AAAAB3NzaC1yc2EAA/5GytXDjAR3XoxTR6uM= test...@test\e}' test

This strips the ssh-rsa line from the file, as expected.

R.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.


Reply via email to